(t *testing.T)
| 74 | } |
| 75 | |
| 76 | func 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 | |
| 96 | func TestPluginVerifyCmd_InvalidProvenance(t *testing.T) { |
| 97 | ensure.HelmHome(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…