(t *testing.T)
| 76 | } |
| 77 | |
| 78 | func 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 | |
| 90 | func TestCheckVersionForServe_DevVersion(t *testing.T) { |
| 91 | release := update.Release{TagName: "v1.0.0"} |
nothing calls this directly
no test coverage detected