MCPcopy
hub / github.com/helm/helm / TestPluginVerifyCmd_MissingProvenance

Function TestPluginVerifyCmd_MissingProvenance

pkg/cmd/plugin_verify_test.go:76–94  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

74}
75
76func TestPluginVerifyCmd_MissingProvenance(t *testing.T) {
77 ensure.HelmHome(t)
78
79 // Create a plugin tarball without .prov file
80 pluginTgz := createTestPluginTarball(t)
81 defer os.Remove(pluginTgz)
82
83 out := &bytes.Buffer{}
84 cmd := newPluginVerifyCmd(out)
85 cmd.SetArgs([]string{pluginTgz})
86
87 err := cmd.Execute()
88 if err == nil {
89 t.Error("expected error when .prov file is missing")
90 }
91 if !strings.Contains(err.Error(), "could not find provenance file") {
92 t.Errorf("expected 'could not find provenance file' error, got: %v", err)
93 }
94}
95
96func TestPluginVerifyCmd_InvalidProvenance(t *testing.T) {
97 ensure.HelmHome(t)

Callers

nothing calls this directly

Calls 6

HelmHomeFunction · 0.92
createTestPluginTarballFunction · 0.85
newPluginVerifyCmdFunction · 0.85
ContainsMethod · 0.80
RemoveMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…