(t *testing.T)
| 26 | } |
| 27 | |
| 28 | func TestRunUpdate_APIError(t *testing.T) { |
| 29 | srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| 30 | w.WriteHeader(http.StatusInternalServerError) |
| 31 | })) |
| 32 | defer srv.Close() |
| 33 | |
| 34 | err := RunUpdate(UpdateOptions{ |
| 35 | Version: "0.5.0", |
| 36 | ReleasesURL: srv.URL, |
| 37 | }) |
| 38 | if err == nil { |
| 39 | t.Error("expected error for API failure") |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | func TestCheckVersionForServe_UpdateAvailable(t *testing.T) { |
| 44 | release := update.Release{TagName: "v0.6.0"} |
nothing calls this directly
no test coverage detected