Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Commit

Permalink
updtaed integration test validation, allowing at least 1 results (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
zagronitay authored Oct 5, 2021
1 parent 066368e commit 3fdb453
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions provider/testing/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,11 @@ func compareDataWithExpected(expected []ExpectedValue, received []map[string]int
toCompare[i] = nil // row passed verification - it won't be used
found++
}
// verification.Count == 0 means we expect at least 1 result
if verification.Count == 0 && found > 0 {
continue
}

if verification.Count != found {
return fmt.Errorf("expected to have %d but got %d entries with one of the %v\nerrors: %v", verification.Count, found, verification.Data, errors)
}
Expand Down

0 comments on commit 3fdb453

Please sign in to comment.