Skip to content

Commit

Permalink
Merge pull request containers#4745 from mtrmac/explicit-decrypt
Browse files Browse the repository at this point in the history
Add smoke tests for encryption CLI helpers
  • Loading branch information
rhatdan authored Jun 14, 2023
2 parents 708a672 + bdd27d3 commit 2935999
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pkg/cli/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,21 @@ func TestLookupEnvVarReferences(t *testing.T) {
})
}

func TestDecryptConfig(t *testing.T) {
// Just a smoke test for the default path.
res, err := DecryptConfig(nil)
assert.NoError(t, err)
assert.Nil(t, res)
}

func TestEncryptConfig(t *testing.T) {
// Just a smoke test for the default path.
cfg, layers, err := EncryptConfig(nil, nil)
assert.NoError(t, err)
assert.Nil(t, cfg)
assert.Nil(t, layers)
}

func TestGetFormat(t *testing.T) {
_, err := GetFormat("bogus")
assert.NotNil(t, err)
Expand Down

0 comments on commit 2935999

Please sign in to comment.