Skip to content

Commit 975979c

Browse files
Cleanup code
1 parent 2181922 commit 975979c

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

sysdig/common_test.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"testing"
77

88
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
9-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
109
)
1110

1211
const (
@@ -46,11 +45,3 @@ func sysdigOrIBMMonitorPreCheck(t *testing.T) func() {
4645
func randomText(len int) string {
4746
return acctest.RandStringFromCharSet(len, acctest.CharSetAlphaNum)
4847
}
49-
50-
// testCaseWithRetry wraps a TestCase to handle it with retry logic for 409 Conflict errors
51-
// Note: This returns the original TestCase since Terraform's SDK doesn't support
52-
// automatic retries at the TestCase level. The retry logic should be implemented
53-
// at the HTTP client level using retryablehttp.CheckRetry
54-
func testCaseWithRetry(testCase resource.TestCase) resource.TestCase {
55-
return testCase
56-
}

sysdig/resource_sysdig_secure_list_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func TestAccList(t *testing.T) {
1717
rText := func() string { return acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum) }
1818
fixedRandomText := rText()
1919

20-
resource.Test(t, testCaseWithRetry(resource.TestCase{
20+
resource.Test(t, resource.TestCase{
2121
PreCheck: preCheckAnyEnv(t, SysdigSecureApiTokenEnv),
2222
ProviderFactories: map[string]func() (*schema.Provider, error){
2323
"sysdig": func() (*schema.Provider, error) {
@@ -46,7 +46,7 @@ func TestAccList(t *testing.T) {
4646
Config: listWithList(rText(), rText()),
4747
},
4848
},
49-
}))
49+
})
5050
}
5151

5252
func listWithName(name string) string {

sysdig/resource_sysdig_secure_macro_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func TestAccMacro(t *testing.T) {
1717
rText := func() string { return acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum) }
1818
fixedRandomText := rText()
1919

20-
resource.Test(t, testCaseWithRetry(resource.TestCase{
20+
resource.Test(t, resource.TestCase{
2121
PreCheck: preCheckAnyEnv(t, SysdigSecureApiTokenEnv),
2222
ProviderFactories: map[string]func() (*schema.Provider, error){
2323
"sysdig": func() (*schema.Provider, error) {
@@ -52,7 +52,7 @@ func TestAccMacro(t *testing.T) {
5252
Config: macroWithMinimumEngineVersion(rText()),
5353
},
5454
},
55-
}))
55+
})
5656
}
5757

5858
func macroWithName(name string) string {

0 commit comments

Comments
 (0)