(t *testing.T)
| 137 | } |
| 138 | |
| 139 | func TestPluginVerifyCmd_KeyringFlag(t *testing.T) { |
| 140 | ensure.HelmHome(t) |
| 141 | |
| 142 | // Create a plugin tarball with .prov file |
| 143 | pluginTgz := createTestPluginTarball(t) |
| 144 | defer os.Remove(pluginTgz) |
| 145 | |
| 146 | // Create .prov file |
| 147 | provFile := pluginTgz + ".prov" |
| 148 | createProvFile(t, provFile, pluginTgz, "") |
| 149 | defer os.Remove(provFile) |
| 150 | |
| 151 | // Create empty keyring file |
| 152 | keyring := createTestKeyring(t) |
| 153 | defer os.Remove(keyring) |
| 154 | |
| 155 | out := &bytes.Buffer{} |
| 156 | cmd := newPluginVerifyCmd(out) |
| 157 | cmd.SetArgs([]string{"--keyring", keyring, pluginTgz}) |
| 158 | |
| 159 | // Should fail with keyring error but command parsing should work |
| 160 | err := cmd.Execute() |
| 161 | if err == nil { |
| 162 | t.Error("expected error with empty keyring") |
| 163 | } |
| 164 | // The important thing is that the keyring flag was parsed and used |
| 165 | } |
| 166 | |
| 167 | func TestPluginVerifyOptions_Run_Success(t *testing.T) { |
| 168 | // Skip this test as it would require real PGP keys and valid signatures |
nothing calls this directly
no test coverage detected
searching dependent graphs…