Skip to content

Commit cb67f6f

Browse files
committed
Fix decryption test due to SOPS breaking change
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
1 parent 6b139ad commit cb67f6f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

internal/decryptor/decryptor_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,8 @@ func TestDecryptor_DecryptResource(t *testing.T) {
704704
got, err := d.DecryptResource(secret)
705705
g.Expect(err).ToNot(HaveOccurred())
706706
g.Expect(got).ToNot(BeNil())
707-
g.Expect(got.GetDataMap()).To(HaveKeyWithValue(corev1.DockerConfigJsonKey, base64.StdEncoding.EncodeToString(plainData)))
707+
plainDataWithTrailingNewline := append(plainData, '\n') // https://github.com/getsops/sops/issues/1825
708+
g.Expect(got.GetDataMap()).To(HaveKeyWithValue(corev1.DockerConfigJsonKey, base64.StdEncoding.EncodeToString(plainDataWithTrailingNewline)))
708709
})
709710

710711
t.Run("nil resource", func(t *testing.T) {

0 commit comments

Comments
 (0)