From 4b94c34874eb011b9bc24614630a5f84539b5283 Mon Sep 17 00:00:00 2001 From: Lei Jin Date: Tue, 16 Jul 2024 19:24:23 +0000 Subject: [PATCH] fix: fix the resource group integration tests Signed-off-by: Lei Jin --- integration/resource_groups_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integration/resource_groups_test.go b/integration/resource_groups_test.go index c1cac14ac..d240a7b55 100644 --- a/integration/resource_groups_test.go +++ b/integration/resource_groups_test.go @@ -20,6 +20,7 @@ package integration import ( "encoding/json" "fmt" + "strings" "testing" "github.com/lacework/go-sdk/api" @@ -173,7 +174,7 @@ func TestResourceGroupDelete(t *testing.T) { t.Run(i.String(), func(t *testing.T) { // setup resource group resourceGroupID, err := createResourceGroup(i.String()) - if err != nil { + if err != nil && !strings.Contains(err.Error(), "already exists in the account") { assert.FailNow(t, err.Error(), fmt.Sprintf("Manually delete resourceGroup CLI_TestCreateResourceGroup_%s", i.String())) }