@@ -102,14 +102,40 @@ func TestAccActionServer_Basic(t *testing.T) {
102102 })
103103}
104104
105- func TestAccActionServer_On_Off (t * testing.T ) {
105+ func TestAccActionServer_UnknownVerb (t * testing.T ) {
106106 if acctest .IsRunningOpenTofu () {
107107 t .Skip ("Skipping TestAccActionServer_Basic because action are not yet supported on OpenTofu" )
108108 }
109109
110110 tt := acctest .NewTestTools (t )
111111 defer tt .Cleanup ()
112112
113+ resource .ParallelTest (t , resource.TestCase {
114+ ProtoV6ProviderFactories : tt .ProviderFactories ,
115+ Steps : []resource.TestStep {
116+ {
117+ Config : `
118+ action "scaleway_instance_server_action" "main" {
119+ config {
120+ action = "unknownVerb"
121+ server_id = "11111111-1111-1111-1111-111111111111"
122+ }
123+ }
124+ ` ,
125+ ExpectError : regexp .MustCompile ("Invalid Attribute Value Match" ),
126+ },
127+ },
128+ })
129+ }
130+
131+ func TestAccActionServer_On_Off (t * testing.T ) {
132+ if acctest .IsRunningOpenTofu () {
133+ t .Skip ("Skipping TestAccActionServer_On_Off because action are not yet supported on OpenTofu" )
134+ }
135+
136+ tt := acctest .NewTestTools (t )
137+ defer tt .Cleanup ()
138+
113139 resource .ParallelTest (t , resource.TestCase {
114140 ProtoV6ProviderFactories : tt .ProviderFactories ,
115141 CheckDestroy : instancechecks .IsServerDestroyed (tt ),
@@ -264,29 +290,3 @@ func readActualServerState(tt *acctest.TestTools, n string, expectedState string
264290 return nil
265291 }
266292}
267-
268- func TestAccActionServer_UnknownVerb (t * testing.T ) {
269- if acctest .IsRunningOpenTofu () {
270- t .Skip ("Skipping TestAccActionServer_Basic because action are not yet supported on OpenTofu" )
271- }
272-
273- tt := acctest .NewTestTools (t )
274- defer tt .Cleanup ()
275-
276- resource .ParallelTest (t , resource.TestCase {
277- ProtoV6ProviderFactories : tt .ProviderFactories ,
278- Steps : []resource.TestStep {
279- {
280- Config : `
281- action "scaleway_instance_server_action" "main" {
282- config {
283- action = "unknownVerb"
284- server_id = "11111111-1111-1111-1111-111111111111"
285- }
286- }
287- ` ,
288- ExpectError : regexp .MustCompile ("Invalid Attribute Value Match" ),
289- },
290- },
291- })
292- }
0 commit comments