File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change 33package sysdig_test
44
55import (
6- "fmt"
76 "os"
87 "strings"
98 "testing"
109
1110 "github.com/draios/terraform-provider-sysdig/sysdig"
12- "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
1311 "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
1412 "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
1513)
@@ -21,28 +19,26 @@ func TestRuleStatefulAppends(t *testing.T) {
2119 }
2220 steps := []resource.TestStep {
2321 {
24- Config : ruleStatefulAppend (rName () ),
22+ Config : ruleStatefulAppend (),
2523 },
2624 }
2725 runStatefulTest (steps , t )
2826}
2927
30- func ruleStatefulAppend (name string ) string {
31- return fmt . Sprintf ( `
28+ func ruleStatefulAppend () string {
29+ return `
3230 resource "sysdig_secure_rule_stateful" "stateful_rule_append" {
3331 name = "API Gateway Enumeration Detected"
3432 source = "awscloudtrail_stateful"
3533 ruletype = "STATEFUL_SEQUENCE"
3634 append = true
3735 exceptions {
3836 values = jsonencode([["abc", ["docker.io/library/busybox"]]])
39- name = "tf_append_%s "
37+ name = "user_accountid "
4038 }
41- }` , name )
39+ }`
4240}
4341
44- func rName () string { return acctest .RandStringFromCharSet (10 , acctest .CharSetAlphaNum ) }
45-
4642func runStatefulTest (steps []resource.TestStep , t * testing.T ) {
4743 resource .Test (t , resource.TestCase {
4844 PreCheck : func () {
You can’t perform that action at this time.
0 commit comments