(t *testing.T)
| 47 | } |
| 48 | |
| 49 | func TestPullRun_ChartNotFound(t *testing.T) { |
| 50 | srv, err := startLocalServerForTests(t, nil) |
| 51 | if err != nil { |
| 52 | t.Fatal(err) |
| 53 | } |
| 54 | defer srv.Close() |
| 55 | |
| 56 | config := actionConfigFixture(t) |
| 57 | client := NewPull(WithConfig(config)) |
| 58 | client.Settings = cli.New() |
| 59 | client.RepoURL = srv.URL |
| 60 | |
| 61 | chartRef := "nginx" |
| 62 | _, err = client.Run(chartRef) |
| 63 | require.ErrorContains(t, err, "404 Not Found") |
| 64 | } |
| 65 | |
| 66 | func startLocalServerForTests(t *testing.T, handler http.Handler) (*httptest.Server, error) { |
| 67 | t.Helper() |
nothing calls this directly
no test coverage detected
searching dependent graphs…