From 7d1a66e62d83d90a3b088e120b65989ee41b217b Mon Sep 17 00:00:00 2001 From: Itay Zagron Date: Tue, 5 Oct 2021 13:10:34 +0300 Subject: [PATCH] updtaed integration test validation, allowing at least 1 results --- provider/testing/integration.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/provider/testing/integration.go b/provider/testing/integration.go index a9e92e5d..e1f4ce85 100644 --- a/provider/testing/integration.go +++ b/provider/testing/integration.go @@ -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) }