Skip to content

Commit

Permalink
add unit test for tls explicitly disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
gunniwho committed Feb 9, 2022
1 parent 80fd62b commit 0f983d9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/scalers/kafka_scaler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ var parseKafkaAuthParamsTestDataset = []parseKafkaAuthParamsTestData{
{map[string]string{"tls": "enable", "ca": "caaa"}, false, true},
// success, SASL + TLS
{map[string]string{"sasl": "plaintext", "username": "admin", "password": "admin", "tls": "enable", "ca": "caaa", "cert": "ceert", "key": "keey"}, false, true},
// success, SASL + TLS explicitly disabled
{map[string]string{"sasl": "plaintext", "username": "admin", "password": "admin", "tls": "disable"}, false, false},
// failure, SASL incorrect type
{map[string]string{"sasl": "foo", "username": "admin", "password": "admin"}, true, false},
// failure, SASL missing username
Expand Down

0 comments on commit 0f983d9

Please sign in to comment.