From de82984b6a50072571cdd3342c8566a7e5ea9b43 Mon Sep 17 00:00:00 2001 From: Viraj Kulkarni Date: Fri, 3 May 2024 11:22:23 -0700 Subject: [PATCH] Pass 2 : Add additional test for code coverage Signed-off-by: Viraj Kulkarni --- pkg/k8s-utils/utils/utils_test.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkg/k8s-utils/utils/utils_test.go b/pkg/k8s-utils/utils/utils_test.go index e883b77..1f4af1a 100644 --- a/pkg/k8s-utils/utils/utils_test.go +++ b/pkg/k8s-utils/utils/utils_test.go @@ -2,6 +2,7 @@ package utils import ( "github.com/keikoproj/flippy/pkg/common" + "github.com/tj/assert" "testing" ) @@ -37,3 +38,18 @@ func TestIsStringMapSubset(t *testing.T) { }) } } + +func TestIsStringMapSubsetNegative(t *testing.T) { + + masterMap := make(map[string]string) + masterMap["test1"] = "test" + masterMap["test2"] = "" + masterMap["test3"] = "true" + masterMap["test4"] = "false" + + subsetMap := make(map[string]string) + subsetMap["test5"] = "test" + + got := IsStringMapSubset(masterMap, subsetMap) + assert.Equal(t, false, got) +}