0.2.64 update
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user