Update testcase for sslCipher.

This commit is contained in:
agile6v 2020-05-13 11:03:15 +08:00
parent 38a8556c4f
commit 38f99cefb2

View file

@ -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)
}
}