MCPcopy
hub / github.com/helm/helm / TestPullRun_ChartNotFound

Function TestPullRun_ChartNotFound

pkg/action/pull_test.go:49–64  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

47}
48
49func 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
66func startLocalServerForTests(t *testing.T, handler http.Handler) (*httptest.Server, error) {
67 t.Helper()

Callers

nothing calls this directly

Calls 8

RunMethod · 0.95
NewFunction · 0.92
actionConfigFixtureFunction · 0.85
NewPullFunction · 0.85
WithConfigFunction · 0.85
FatalMethod · 0.80
CloseMethod · 0.80
startLocalServerForTestsFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…