MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / TestCheckVersionForServe_APIFailure

Function TestCheckVersionForServe_APIFailure

internal/cmd/update_test.go:78–88  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

76}
77
78func TestCheckVersionForServe_APIFailure(t *testing.T) {
79 srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
80 w.WriteHeader(http.StatusInternalServerError)
81 }))
82 defer srv.Close()
83
84 result := CheckVersionForServe("0.5.0", srv.URL)
85 if result != nil {
86 t.Error("expected nil result on API failure")
87 }
88}
89
90func TestCheckVersionForServe_DevVersion(t *testing.T) {
91 release := update.Release{TagName: "v1.0.0"}

Callers

nothing calls this directly

Calls 1

CheckVersionForServeFunction · 0.85

Tested by

no test coverage detected