From e2aad488524ef54000e1de44431d86c6e77ac4dd Mon Sep 17 00:00:00 2001 From: Andrew Keesler Date: Fri, 11 Dec 2020 11:46:24 -0500 Subject: [PATCH] internal/oidc/dynamiccodec: loosen test to reduce flakes When we try to decode with the wrong decryption key, we could get any number of error messages, depending on what failure mode we are in (couldn't authenticate plaintext after decryption, couldn't deserialize, etc.). This change makes the test weaker, but at least we know we will get an error message in the case where the decryption key is wrong. Signed-off-by: Andrew Keesler --- internal/oidc/dynamiccodec/codec_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/oidc/dynamiccodec/codec_test.go b/internal/oidc/dynamiccodec/codec_test.go index e106a55d..bcff2d03 100644 --- a/internal/oidc/dynamiccodec/codec_test.go +++ b/internal/oidc/dynamiccodec/codec_test.go @@ -74,7 +74,7 @@ func TestCodec(t *testing.T) { keys: func(encoderSigningKey, encoderEncryptionKey, decoderSigningKey, decoderEncryptionKey *[]byte) { *encoderEncryptionKey = []byte("16-byte-no-match") }, - wantDecoderError: "securecookie: error - caused by: securecookie: error - caused by: invalid character '", + wantDecoderError: "securecookie: error - caused by: securecookie: error - caused by: ", }, } for _, test := range tests {