@@ -18,7 +18,7 @@ var configVariables = config.Variables{
18
18
"zone_id" : config .StringVariable (os .Getenv ("CLOUDFLARE_ZONE_ID" )),
19
19
}
20
20
21
- func TestAccCloudflareRuleset_Name (t * testing.T ) {
21
+ func TestAccCloudflareRuleset_Kind (t * testing.T ) {
22
22
resource .Test (t , resource.TestCase {
23
23
PreCheck : func () { acctest .TestAccPreCheck (t ) },
24
24
ProtoV6ProviderFactories : acctest .TestAccProtoV6ProviderFactories ,
@@ -31,16 +31,16 @@ func TestAccCloudflareRuleset_Name(t *testing.T) {
31
31
plancheck .ExpectResourceAction ("cloudflare_ruleset.my_ruleset" , plancheck .ResourceActionCreate ),
32
32
plancheck .ExpectKnownValue (
33
33
"cloudflare_ruleset.my_ruleset" ,
34
- tfjsonpath .New ("name " ),
35
- knownvalue .StringExact ("My ruleset " ),
34
+ tfjsonpath .New ("kind " ),
35
+ knownvalue .StringExact ("root " ),
36
36
),
37
37
},
38
38
},
39
39
ConfigStateChecks : []statecheck.StateCheck {
40
40
statecheck .ExpectKnownValue (
41
41
"cloudflare_ruleset.my_ruleset" ,
42
- tfjsonpath .New ("name " ),
43
- knownvalue .StringExact ("My ruleset " ),
42
+ tfjsonpath .New ("kind " ),
43
+ knownvalue .StringExact ("root " ),
44
44
),
45
45
},
46
46
},
@@ -52,24 +52,24 @@ func TestAccCloudflareRuleset_Name(t *testing.T) {
52
52
plancheck .ExpectResourceAction ("cloudflare_ruleset.my_ruleset" , plancheck .ResourceActionReplace ),
53
53
plancheck .ExpectKnownValue (
54
54
"cloudflare_ruleset.my_ruleset" ,
55
- tfjsonpath .New ("name " ),
56
- knownvalue .StringExact ("My updated ruleset " ),
55
+ tfjsonpath .New ("kind " ),
56
+ knownvalue .StringExact ("custom " ),
57
57
),
58
58
},
59
59
},
60
60
ConfigStateChecks : []statecheck.StateCheck {
61
61
statecheck .ExpectKnownValue (
62
62
"cloudflare_ruleset.my_ruleset" ,
63
- tfjsonpath .New ("name " ),
64
- knownvalue .StringExact ("My updated ruleset " ),
63
+ tfjsonpath .New ("kind " ),
64
+ knownvalue .StringExact ("custom " ),
65
65
),
66
66
},
67
67
},
68
68
},
69
69
})
70
70
}
71
71
72
- func TestAccCloudflareRuleset_Description (t * testing.T ) {
72
+ func TestAccCloudflareRuleset_Name (t * testing.T ) {
73
73
resource .Test (t , resource.TestCase {
74
74
PreCheck : func () { acctest .TestAccPreCheck (t ) },
75
75
ProtoV6ProviderFactories : acctest .TestAccProtoV6ProviderFactories ,
@@ -82,16 +82,16 @@ func TestAccCloudflareRuleset_Description(t *testing.T) {
82
82
plancheck .ExpectResourceAction ("cloudflare_ruleset.my_ruleset" , plancheck .ResourceActionCreate ),
83
83
plancheck .ExpectKnownValue (
84
84
"cloudflare_ruleset.my_ruleset" ,
85
- tfjsonpath .New ("description " ),
86
- knownvalue .StringExact ("My ruleset description " ),
85
+ tfjsonpath .New ("name " ),
86
+ knownvalue .StringExact ("My ruleset" ),
87
87
),
88
88
},
89
89
},
90
90
ConfigStateChecks : []statecheck.StateCheck {
91
91
statecheck .ExpectKnownValue (
92
92
"cloudflare_ruleset.my_ruleset" ,
93
- tfjsonpath .New ("description " ),
94
- knownvalue .StringExact ("My ruleset description " ),
93
+ tfjsonpath .New ("name " ),
94
+ knownvalue .StringExact ("My ruleset" ),
95
95
),
96
96
},
97
97
},
@@ -100,11 +100,11 @@ func TestAccCloudflareRuleset_Description(t *testing.T) {
100
100
ConfigVariables : configVariables ,
101
101
ConfigPlanChecks : resource.ConfigPlanChecks {
102
102
PreApply : []plancheck.PlanCheck {
103
- plancheck .ExpectResourceAction ("cloudflare_ruleset.my_ruleset" , plancheck .ResourceActionUpdate ),
103
+ plancheck .ExpectResourceAction ("cloudflare_ruleset.my_ruleset" , plancheck .ResourceActionReplace ),
104
104
plancheck .ExpectKnownValue (
105
105
"cloudflare_ruleset.my_ruleset" ,
106
106
tfjsonpath .New ("name" ),
107
- knownvalue .StringExact ("My updated ruleset description " ),
107
+ knownvalue .StringExact ("My updated ruleset" ),
108
108
),
109
109
},
110
110
},
@@ -171,7 +171,7 @@ func TestAccCloudflareRuleset_Phase(t *testing.T) {
171
171
})
172
172
}
173
173
174
- func TestAccCloudflareRuleset_Kind (t * testing.T ) {
174
+ func TestAccCloudflareRuleset_Description (t * testing.T ) {
175
175
resource .Test (t , resource.TestCase {
176
176
PreCheck : func () { acctest .TestAccPreCheck (t ) },
177
177
ProtoV6ProviderFactories : acctest .TestAccProtoV6ProviderFactories ,
@@ -184,16 +184,16 @@ func TestAccCloudflareRuleset_Kind(t *testing.T) {
184
184
plancheck .ExpectResourceAction ("cloudflare_ruleset.my_ruleset" , plancheck .ResourceActionCreate ),
185
185
plancheck .ExpectKnownValue (
186
186
"cloudflare_ruleset.my_ruleset" ,
187
- tfjsonpath .New ("kind " ),
188
- knownvalue .StringExact ("root " ),
187
+ tfjsonpath .New ("description " ),
188
+ knownvalue .StringExact ("My ruleset description " ),
189
189
),
190
190
},
191
191
},
192
192
ConfigStateChecks : []statecheck.StateCheck {
193
193
statecheck .ExpectKnownValue (
194
194
"cloudflare_ruleset.my_ruleset" ,
195
- tfjsonpath .New ("kind " ),
196
- knownvalue .StringExact ("root " ),
195
+ tfjsonpath .New ("description " ),
196
+ knownvalue .StringExact ("My ruleset description " ),
197
197
),
198
198
},
199
199
},
@@ -202,27 +202,27 @@ func TestAccCloudflareRuleset_Kind(t *testing.T) {
202
202
ConfigVariables : configVariables ,
203
203
ConfigPlanChecks : resource.ConfigPlanChecks {
204
204
PreApply : []plancheck.PlanCheck {
205
- plancheck .ExpectResourceAction ("cloudflare_ruleset.my_ruleset" , plancheck .ResourceActionReplace ),
205
+ plancheck .ExpectResourceAction ("cloudflare_ruleset.my_ruleset" , plancheck .ResourceActionUpdate ),
206
206
plancheck .ExpectKnownValue (
207
207
"cloudflare_ruleset.my_ruleset" ,
208
- tfjsonpath .New ("kind " ),
209
- knownvalue .StringExact ("custom " ),
208
+ tfjsonpath .New ("name " ),
209
+ knownvalue .StringExact ("My updated ruleset description " ),
210
210
),
211
211
},
212
212
},
213
213
ConfigStateChecks : []statecheck.StateCheck {
214
214
statecheck .ExpectKnownValue (
215
215
"cloudflare_ruleset.my_ruleset" ,
216
- tfjsonpath .New ("kind " ),
217
- knownvalue .StringExact ("custom " ),
216
+ tfjsonpath .New ("name " ),
217
+ knownvalue .StringExact ("My updated ruleset " ),
218
218
),
219
219
},
220
220
},
221
221
},
222
222
})
223
223
}
224
224
225
- func TestAccCloudflareRuleset_RuleLogging (t * testing.T ) {
225
+ func TestAccCloudflareRuleset_RulesLogging (t * testing.T ) {
226
226
resource .Test (t , resource.TestCase {
227
227
PreCheck : func () { acctest .TestAccPreCheck (t ) },
228
228
ProtoV6ProviderFactories : acctest .TestAccProtoV6ProviderFactories ,
@@ -597,7 +597,7 @@ func TestAccCloudflareRuleset_RuleLogging(t *testing.T) {
597
597
})
598
598
}
599
599
600
- func TestAccCloudflareRuleset_RuleRef (t * testing.T ) {
600
+ func TestAccCloudflareRuleset_RulesRef (t * testing.T ) {
601
601
t .Run ("add" , func (t * testing.T ) {
602
602
resource .Test (t , resource.TestCase {
603
603
PreCheck : func () { acctest .TestAccPreCheck (t ) },
0 commit comments