Skip to content

Commit

Permalink
Update test cases to deal with hostlists
Browse files Browse the repository at this point in the history
Signed-off-by: David Pochopsky <[email protected]>
  • Loading branch information
dpochopsky committed Feb 12, 2025
1 parent 3cdcf33 commit 09cda29
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/scalers/solace_scaler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -545,9 +545,12 @@ func TestSolaceParseSolaceMetadata(t *testing.T) {
default:
fmt.Println(" --> PASS")
}
if !testData.isError && strings.Contains(testData.metadata["queueName"], "/") && !strings.Contains(meta.EndpointURL, url.QueryEscape(testData.metadata["queueName"])) {
t.Error("expected endpointURL to query escape special characters in the URL but got:", meta.EndpointURL)
fmt.Println(" --> FAIL")
for i := 0; i < len(s.metadata.endpointURLsList); i++ {

Check failure on line 548 in pkg/scalers/solace_scaler_test.go

View workflow job for this annotation

GitHub Actions / Static Checks

undefined: s
sempQueueURL := s.metadata.endpointURLsList[i]

Check failure on line 549 in pkg/scalers/solace_scaler_test.go

View workflow job for this annotation

GitHub Actions / Static Checks

undefined: s (typecheck)
if !testData.isError && strings.Contains(testData.metadata["queueName"], "/") && !strings.Contains(sempQueueURL, url.QueryEscape(testData.metadata["queueName"])) {
t.Error("expected endpointURL to query escape special characters in the URL but got:", sempQueueURL)
fmt.Println(" --> FAIL")
}
}
}
for _, testData := range testSolaceEnvCreds {
Expand Down

0 comments on commit 09cda29

Please sign in to comment.