provider/aws: Run AWS Spot Datafeed Subscription tests in serial
This commit is contained in:
parent
ebc89e9426
commit
20b0d9f060
|
@ -7,7 +7,7 @@ import (
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
"github.com/hashicorp/terraform/helper/resource"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAccAWSSpotDatafeedSubscription_importBasic(t *testing.T) {
|
func testAccAWSSpotDatafeedSubscription_importBasic(t *testing.T) {
|
||||||
resourceName := "aws_spot_datafeed_subscription.default"
|
resourceName := "aws_spot_datafeed_subscription.default"
|
||||||
ri := acctest.RandInt()
|
ri := acctest.RandInt()
|
||||||
|
|
||||||
|
@ -16,11 +16,11 @@ func TestAccAWSSpotDatafeedSubscription_importBasic(t *testing.T) {
|
||||||
Providers: testAccProviders,
|
Providers: testAccProviders,
|
||||||
CheckDestroy: testAccCheckAWSSpotDatafeedSubscriptionDestroy,
|
CheckDestroy: testAccCheckAWSSpotDatafeedSubscriptionDestroy,
|
||||||
Steps: []resource.TestStep{
|
Steps: []resource.TestStep{
|
||||||
resource.TestStep{
|
{
|
||||||
Config: testAccAWSSpotDatafeedSubscription(ri),
|
Config: testAccAWSSpotDatafeedSubscription(ri),
|
||||||
},
|
},
|
||||||
|
|
||||||
resource.TestStep{
|
{
|
||||||
ResourceName: resourceName,
|
ResourceName: resourceName,
|
||||||
ImportState: true,
|
ImportState: true,
|
||||||
ImportStateVerify: true,
|
ImportStateVerify: true,
|
||||||
|
|
|
@ -12,7 +12,21 @@ import (
|
||||||
"github.com/hashicorp/terraform/terraform"
|
"github.com/hashicorp/terraform/terraform"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAccAWSSpotDatafeedSubscription_basic(t *testing.T) {
|
func TestAccAWSSpotDatafeedSubscription(t *testing.T) {
|
||||||
|
cases := map[string]func(t *testing.T){
|
||||||
|
"basic": testAccAWSSpotDatafeedSubscription_basic,
|
||||||
|
"disappears": testAccAWSSpotDatafeedSubscription_disappears,
|
||||||
|
"import": testAccAWSSpotDatafeedSubscription_importBasic,
|
||||||
|
}
|
||||||
|
|
||||||
|
for name, tc := range cases {
|
||||||
|
t.Run(name, func(t *testing.T) {
|
||||||
|
tc(t)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func testAccAWSSpotDatafeedSubscription_basic(t *testing.T) {
|
||||||
var subscription ec2.SpotDatafeedSubscription
|
var subscription ec2.SpotDatafeedSubscription
|
||||||
ri := acctest.RandInt()
|
ri := acctest.RandInt()
|
||||||
|
|
||||||
|
@ -21,7 +35,7 @@ func TestAccAWSSpotDatafeedSubscription_basic(t *testing.T) {
|
||||||
Providers: testAccProviders,
|
Providers: testAccProviders,
|
||||||
CheckDestroy: testAccCheckAWSSpotDatafeedSubscriptionDestroy,
|
CheckDestroy: testAccCheckAWSSpotDatafeedSubscriptionDestroy,
|
||||||
Steps: []resource.TestStep{
|
Steps: []resource.TestStep{
|
||||||
resource.TestStep{
|
{
|
||||||
Config: testAccAWSSpotDatafeedSubscription(ri),
|
Config: testAccAWSSpotDatafeedSubscription(ri),
|
||||||
Check: resource.ComposeTestCheckFunc(
|
Check: resource.ComposeTestCheckFunc(
|
||||||
testAccCheckAWSSpotDatafeedSubscriptionExists("aws_spot_datafeed_subscription.default", &subscription),
|
testAccCheckAWSSpotDatafeedSubscriptionExists("aws_spot_datafeed_subscription.default", &subscription),
|
||||||
|
@ -55,7 +69,7 @@ func testAccCheckAWSSpotDatafeedSubscriptionDisappears(subscription *ec2.SpotDat
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestAccAWSSpotDatafeedSubscription_disappears(t *testing.T) {
|
func testAccAWSSpotDatafeedSubscription_disappears(t *testing.T) {
|
||||||
var subscription ec2.SpotDatafeedSubscription
|
var subscription ec2.SpotDatafeedSubscription
|
||||||
ri := acctest.RandInt()
|
ri := acctest.RandInt()
|
||||||
|
|
||||||
|
@ -64,7 +78,7 @@ func TestAccAWSSpotDatafeedSubscription_disappears(t *testing.T) {
|
||||||
Providers: testAccProviders,
|
Providers: testAccProviders,
|
||||||
CheckDestroy: testAccCheckAWSSpotDatafeedSubscriptionDestroy,
|
CheckDestroy: testAccCheckAWSSpotDatafeedSubscriptionDestroy,
|
||||||
Steps: []resource.TestStep{
|
Steps: []resource.TestStep{
|
||||||
resource.TestStep{
|
{
|
||||||
Config: testAccAWSSpotDatafeedSubscription(ri),
|
Config: testAccAWSSpotDatafeedSubscription(ri),
|
||||||
Check: resource.ComposeTestCheckFunc(
|
Check: resource.ComposeTestCheckFunc(
|
||||||
testAccCheckAWSSpotDatafeedSubscriptionExists("aws_spot_datafeed_subscription.default", &subscription),
|
testAccCheckAWSSpotDatafeedSubscriptionExists("aws_spot_datafeed_subscription.default", &subscription),
|
||||||
|
|
Loading…
Reference in New Issue