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

Function TestCheckForUpdate_DevVersion

internal/update/update_test.go:57–71  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

55}
56
57func TestCheckForUpdate_DevVersion(t *testing.T) {
58 release := Release{TagName: "v1.0.0"}
59 srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
60 json.NewEncoder(w).Encode(release)
61 }))
62 defer srv.Close()
63
64 result, err := CheckForUpdate("dev", Options{ReleasesURL: srv.URL})
65 if err != nil {
66 t.Fatalf("unexpected error: %v", err)
67 }
68 if result.UpdateAvailable {
69 t.Error("dev version should not report update available")
70 }
71}
72
73func TestCheckForUpdate_DevBuildSameTag(t *testing.T) {
74 release := Release{TagName: "v0.4.0"}

Callers

nothing calls this directly

Calls 1

CheckForUpdateFunction · 0.85

Tested by

no test coverage detected