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

Function TestRunUpdate_AlreadyLatest

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

Source from the content-addressed store, hash-verified

10)
11
12func TestRunUpdate_AlreadyLatest(t *testing.T) {
13 release := update.Release{TagName: "v0.5.0"}
14 srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
15 json.NewEncoder(w).Encode(release)
16 }))
17 defer srv.Close()
18
19 err := RunUpdate(UpdateOptions{
20 Version: "0.5.0",
21 ReleasesURL: srv.URL,
22 })
23 if err != nil {
24 t.Fatalf("unexpected error: %v", err)
25 }
26}
27
28func TestRunUpdate_APIError(t *testing.T) {
29 srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {

Callers

nothing calls this directly

Calls 1

RunUpdateFunction · 0.85

Tested by

no test coverage detected