Skip to content

Commit

Permalink
added unit test for this fix kedacore#4110
Browse files Browse the repository at this point in the history
Signed-off-by: ithesadson <thesadson@gmail.com>
  • Loading branch information
ithesadson committed Jan 30, 2023
1 parent a7f2306 commit 61c333f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/scalers/cassandra_scaler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ var testCassandraMetadata = []parseCassandraMetadataTestData{
{map[string]string{"query": "SELECT COUNT(*) FROM test_keyspace.test_table;", "targetQueryValue": "1", "username": "cassandra", "clusterIPAddress": "cassandra.test:9042", "ScalerIndex": "0", "metricName": "myMetric"}, true, map[string]string{"password": "Y2Fzc2FuZHJhCg=="}},
// no password passed
{map[string]string{"query": "SELECT COUNT(*) FROM test_keyspace.test_table;", "targetQueryValue": "1", "username": "cassandra", "clusterIPAddress": "cassandra.test:9042", "keyspace": "test_keyspace", "ScalerIndex": "0", "metricName": "myMetric"}, true, map[string]string{}},
// fix issue[4110] passed
{map[string]string{"query": "SELECT COUNT(*) FROM test_keyspace.test_table;", "targetQueryValue": "1", "username": "cassandra", "port": "9042", "clusterIPAddress": "https://cassandra.test", "keyspace": "test_keyspace", "ScalerIndex": "0", "metricName": "myMetric"}, false, map[string]string{"password": "Y2Fzc2FuZHJhCg=="}},
}

var cassandraMetricIdentifiers = []cassandraMetricIdentifier{
Expand Down

0 comments on commit 61c333f

Please sign in to comment.