From bdd27d39372ba5de7e295c67731d2b754ef81e5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Tue, 13 Jun 2023 19:39:12 +0200 Subject: [PATCH] Add smoke tests for encryption CLI helpers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miloslav Trmač --- pkg/cli/common_test.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkg/cli/common_test.go b/pkg/cli/common_test.go index 77fe2d28e0d..7449a6c512d 100644 --- a/pkg/cli/common_test.go +++ b/pkg/cli/common_test.go @@ -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)