From 38f99cefb28dcdbfcdbb9aeea2eb878d9693865b Mon Sep 17 00:00:00 2001 From: agile6v Date: Wed, 13 May 2020 11:03:15 +0800 Subject: [PATCH] Update testcase for sslCipher. --- internal/ingress/annotations/sslcipher/main_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/ingress/annotations/sslcipher/main_test.go b/internal/ingress/annotations/sslcipher/main_test.go index 5957db203..29f512c7b 100644 --- a/internal/ingress/annotations/sslcipher/main_test.go +++ b/internal/ingress/annotations/sslcipher/main_test.go @@ -56,7 +56,11 @@ func TestParse(t *testing.T) { for _, testCase := range testCases { ing.SetAnnotations(testCase.annotations) result, _ := ap.Parse(ing) - if result.SSLCiphers != testCase.expected { + config, ok := result.(*Config) + if !ok { + t.Fatalf("expected a Config type") + } + if config.SSLCiphers != testCase.expected { t.Errorf("expected %v but returned %v, annotations: %s", testCase.expected, result, testCase.annotations) } }