Skip to content

Commit 72686fa

Browse files
committed
fix tests
1 parent a8a081d commit 72686fa

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed
Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
package sysdig_test
22

33
import (
4-
"os"
54
"testing"
65

7-
"github.com/draios/terraform-provider-sysdig/sysdig"
8-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
96
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
10-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
117
)
128

13-
func TestRuleGuardDutyAppends(t *testing.T) {
9+
func TestRuleStatefulAppends(t *testing.T) {
1410
steps := []resource.TestStep{
1511
{
1612
Config: ruleStatefulAppend(randomString()),
@@ -32,22 +28,3 @@ func ruleStatefulAppend(name string) string {
3228
}
3329
}`
3430
}
35-
36-
func randomString() string { return acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum) }
37-
38-
func runTest(steps []resource.TestStep, t *testing.T) {
39-
resource.Test(t, resource.TestCase{
40-
PreCheck: func() {
41-
if v := os.Getenv("SYSDIG_SECURE_API_TOKEN"); v == "" {
42-
t.Fatal("SYSDIG_SECURE_API_TOKEN must be set for acceptance tests")
43-
}
44-
},
45-
ProviderFactories: map[string]func() (*schema.Provider, error){
46-
"sysdig": func() (*schema.Provider, error) {
47-
return sysdig.Provider(), nil
48-
},
49-
},
50-
Steps: steps,
51-
})
52-
53-
}

0 commit comments

Comments
 (0)