Files
memby/builder/controller_test.go
T
2026-08-15 09:23:26 +12:00

19 lines
454 B
Go

package main
import (
"net/http"
"net/http/httptest"
"strings"
"testing"
)
func TestIdleStatusEmitsEmptyLogsArray(t *testing.T) {
c := &controller{status: releaseStatus{State: "idle"}}
recorder := httptest.NewRecorder()
c.handleStatus(recorder, httptest.NewRequest(http.MethodGet, "/v1/status", nil))
if got := recorder.Body.String(); !strings.Contains(got, `"logs":[]`) {
t.Fatalf("idle status must emit an empty logs array: %s", got)
}
}