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

Function TestCheckVersionForServe_DevVersion

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

Source from the content-addressed store, hash-verified

88}
89
90func TestCheckVersionForServe_DevVersion(t *testing.T) {
91 release := update.Release{TagName: "v1.0.0"}
92 srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
93 json.NewEncoder(w).Encode(release)
94 }))
95 defer srv.Close()
96
97 result := CheckVersionForServe("dev", srv.URL)
98 if result == nil {
99 t.Fatal("expected non-nil result")
100 }
101 if result.UpdateAvailable {
102 t.Error("dev version should not report update available")
103 }
104}

Callers

nothing calls this directly

Calls 1

CheckVersionForServeFunction · 0.85

Tested by

no test coverage detected