mirror of
https://github.com/containers/podman.git
synced 2025-06-22 18:08:11 +08:00
cli: podman push --encryption-key use StringArray()
This option accepts a file path so we should allow commas in it. Also add tests for --decryption-key Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -138,7 +138,7 @@ func pushFlags(cmd *cobra.Command) {
|
||||
_ = cmd.RegisterFlagCompletionFunc(compLevel, completion.AutocompleteNone)
|
||||
|
||||
encryptionKeysFlagName := "encryption-key"
|
||||
flags.StringSliceVar(&pushOptions.EncryptionKeys, encryptionKeysFlagName, nil, "Key with the encryption protocol to use to encrypt the image (e.g. jwe:/path/to/key.pem)")
|
||||
flags.StringArrayVar(&pushOptions.EncryptionKeys, encryptionKeysFlagName, nil, "Key with the encryption protocol to use to encrypt the image (e.g. jwe:/path/to/key.pem)")
|
||||
_ = cmd.RegisterFlagCompletionFunc(encryptionKeysFlagName, completion.AutocompleteDefault)
|
||||
|
||||
encryptLayersFlagName := "encrypt-layer"
|
||||
|
@ -612,7 +612,7 @@ var _ = Describe("Podman pull", func() {
|
||||
|
||||
decryptionTestHelper := func(imgPath string) *PodmanSessionIntegration {
|
||||
bitSize := 1024
|
||||
keyFileName := filepath.Join(podmanTest.TempDir, "key")
|
||||
keyFileName := filepath.Join(podmanTest.TempDir, "key,withcomma")
|
||||
publicKeyFileName, privateKeyFileName, err := WriteRSAKeyPair(keyFileName, bitSize)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
|
@ -2152,7 +2152,7 @@ WORKDIR /madethis`, BB)
|
||||
}
|
||||
|
||||
bitSize := 1024
|
||||
keyFileName := filepath.Join(podmanTest.TempDir, "key")
|
||||
keyFileName := filepath.Join(podmanTest.TempDir, "key,withcomma")
|
||||
publicKeyFileName, privateKeyFileName, err := WriteRSAKeyPair(keyFileName, bitSize)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
|
Reference in New Issue
Block a user