Skip to content

Commit a8a1636

Browse files
committed
Update tests
1 parent c4f2d6c commit a8a1636

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

internal/service/ec2/stop_instance_action_test.go

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ func TestAccEC2StopInstanceAction_basic(t *testing.T) {
2929
},
3030
ErrorCheck: acctest.ErrorCheck(t, names.EC2ServiceID),
3131
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
32-
CheckDestroy: testAccCheckInstanceDestroy(ctx),
3332
Steps: []resource.TestStep{
3433
{
3534
Config: testAccStopInstanceActionConfig_basic(),
@@ -61,7 +60,6 @@ func TestAccEC2StopInstanceAction_force(t *testing.T) {
6160
},
6261
ErrorCheck: acctest.ErrorCheck(t, names.EC2ServiceID),
6362
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
64-
CheckDestroy: testAccCheckInstanceDestroy(ctx),
6563
Steps: []resource.TestStep{
6664
{
6765
Config: testAccStopInstanceActionConfig_basic(),
@@ -93,7 +91,6 @@ func TestAccEC2StopInstanceAction_customTimeout(t *testing.T) {
9391
},
9492
ErrorCheck: acctest.ErrorCheck(t, names.EC2ServiceID),
9593
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
96-
CheckDestroy: testAccCheckInstanceDestroy(ctx),
9794
Steps: []resource.TestStep{
9895
{
9996
Config: testAccStopInstanceActionConfig_basic(),
@@ -162,7 +159,9 @@ func testAccStopInstanceActionConfig_withAction() string {
162159
testAccStopInstanceActionConfig_basic(),
163160
`
164161
action "aws_ec2_stop_instance" "test" {
165-
instance_id = aws_instance.test.id
162+
config {
163+
instance_id = aws_instance.test.id
164+
}
166165
}
167166
`)
168167
}
@@ -172,8 +171,10 @@ func testAccStopInstanceActionConfig_withForce() string {
172171
testAccStopInstanceActionConfig_basic(),
173172
`
174173
action "aws_ec2_stop_instance" "test" {
175-
instance_id = aws_instance.test.id
176-
force = true
174+
config {
175+
instance_id = aws_instance.test.id
176+
force = true
177+
}
177178
}
178179
`)
179180
}
@@ -183,8 +184,10 @@ func testAccStopInstanceActionConfig_withTimeout() string {
183184
testAccStopInstanceActionConfig_basic(),
184185
`
185186
action "aws_ec2_stop_instance" "test" {
186-
instance_id = aws_instance.test.id
187-
timeout = 300
187+
config {
188+
instance_id = aws_instance.test.id
189+
timeout = 300
190+
}
188191
}
189192
`)
190193
}

0 commit comments

Comments
 (0)