Skip to content

Commit

Permalink
Merge pull request #15321 from terraform-providers/t-gov-fsx-lustre
Browse files Browse the repository at this point in the history
tests/provider: Add precheck (FSx lustre)
  • Loading branch information
YakDriver authored Sep 28, 2020
2 parents f799b0f + 78e390d commit d7cf40f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 deletions.
26 changes: 13 additions & 13 deletions aws/resource_aws_fsx_lustre_file_system_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func TestAccAWSFsxLustreFileSystem_basic(t *testing.T) {
resourceName := "aws_fsx_lustre_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxLustreFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -118,7 +118,7 @@ func TestAccAWSFsxLustreFileSystem_disappears(t *testing.T) {
resourceName := "aws_fsx_lustre_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxLustreFileSystemDestroy,
Steps: []resource.TestStep{
Expand All @@ -140,7 +140,7 @@ func TestAccAWSFsxLustreFileSystem_ExportPath(t *testing.T) {
rName := acctest.RandomWithPrefix("tf-acc-test")

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxLustreFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -176,7 +176,7 @@ func TestAccAWSFsxLustreFileSystem_ImportPath(t *testing.T) {
rName := acctest.RandomWithPrefix("tf-acc-test")

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxLustreFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -212,7 +212,7 @@ func TestAccAWSFsxLustreFileSystem_ImportedFileChunkSize(t *testing.T) {
rName := acctest.RandomWithPrefix("tf-acc-test")

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxLustreFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -246,7 +246,7 @@ func TestAccAWSFsxLustreFileSystem_SecurityGroupIds(t *testing.T) {
resourceName := "aws_fsx_lustre_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxLustreFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -280,7 +280,7 @@ func TestAccAWSFsxLustreFileSystem_StorageCapacity(t *testing.T) {
resourceName := "aws_fsx_lustre_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxLustreFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -314,7 +314,7 @@ func TestAccAWSFsxLustreFileSystem_Tags(t *testing.T) {
resourceName := "aws_fsx_lustre_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxLustreFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -360,7 +360,7 @@ func TestAccAWSFsxLustreFileSystem_WeeklyMaintenanceStartTime(t *testing.T) {
resourceName := "aws_fsx_lustre_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxLustreFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -394,7 +394,7 @@ func TestAccAWSFsxLustreFileSystem_automaticBackupRetentionDays(t *testing.T) {
resourceName := "aws_fsx_lustre_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxLustreFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -435,7 +435,7 @@ func TestAccAWSFsxLustreFileSystem_DeploymentTypePersistent1(t *testing.T) {
resourceName := "aws_fsx_lustre_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxLustreFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -469,7 +469,7 @@ func TestAccAWSFsxLustreFileSystem_KmsKeyId(t *testing.T) {
kmsKeyResourceName2 := "aws_kms_key.test2"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxLustreFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -505,7 +505,7 @@ func TestAccAWSFsxLustreFileSystem_DeploymentTypeScratch2(t *testing.T) {
resourceName := "aws_fsx_lustre_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxLustreFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down
32 changes: 16 additions & 16 deletions aws/resource_aws_fsx_windows_file_system_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func TestAccAWSFsxWindowsFileSystem_basic(t *testing.T) {
resourceName := "aws_fsx_windows_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxWindowsFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -127,7 +127,7 @@ func TestAccAWSFsxWindowsFileSystem_singleAz2(t *testing.T) {
resourceName := "aws_fsx_windows_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxWindowsFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -174,7 +174,7 @@ func TestAccAWSFsxWindowsFileSystem_storageTypeHdd(t *testing.T) {
resourceName := "aws_fsx_windows_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxWindowsFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -204,7 +204,7 @@ func TestAccAWSFsxWindowsFileSystem_multiAz(t *testing.T) {
resourceName := "aws_fsx_windows_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxWindowsFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -250,7 +250,7 @@ func TestAccAWSFsxWindowsFileSystem_disappears(t *testing.T) {
resourceName := "aws_fsx_windows_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxWindowsFileSystemDestroy,
Steps: []resource.TestStep{
Expand All @@ -271,7 +271,7 @@ func TestAccAWSFsxWindowsFileSystem_AutomaticBackupRetentionDays(t *testing.T) {
resourceName := "aws_fsx_windows_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxWindowsFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -316,7 +316,7 @@ func TestAccAWSFsxWindowsFileSystem_CopyTagsToBackups(t *testing.T) {
resourceName := "aws_fsx_windows_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxWindowsFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -353,7 +353,7 @@ func TestAccAWSFsxWindowsFileSystem_DailyAutomaticBackupStartTime(t *testing.T)
resourceName := "aws_fsx_windows_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxWindowsFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -392,7 +392,7 @@ func TestAccAWSFsxWindowsFileSystem_KmsKeyId(t *testing.T) {
resourceName := "aws_fsx_windows_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxWindowsFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -429,7 +429,7 @@ func TestAccAWSFsxWindowsFileSystem_SecurityGroupIds(t *testing.T) {
resourceName := "aws_fsx_windows_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxWindowsFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -466,7 +466,7 @@ func TestAccAWSFsxWindowsFileSystem_SelfManagedActiveDirectory(t *testing.T) {
resourceName := "aws_fsx_windows_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxWindowsFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -496,7 +496,7 @@ func TestAccAWSFsxWindowsFileSystem_SelfManagedActiveDirectory_Username(t *testi
resourceName := "aws_fsx_windows_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxWindowsFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -533,7 +533,7 @@ func TestAccAWSFsxWindowsFileSystem_StorageCapacity(t *testing.T) {
resourceName := "aws_fsx_windows_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxWindowsFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -570,7 +570,7 @@ func TestAccAWSFsxWindowsFileSystem_Tags(t *testing.T) {
resourceName := "aws_fsx_windows_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxWindowsFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -619,7 +619,7 @@ func TestAccAWSFsxWindowsFileSystem_ThroughputCapacity(t *testing.T) {
resourceName := "aws_fsx_windows_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxWindowsFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -656,7 +656,7 @@ func TestAccAWSFsxWindowsFileSystem_WeeklyMaintenanceStartTime(t *testing.T) {
resourceName := "aws_fsx_windows_file_system.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("fsx", t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFsxWindowsFileSystemDestroy,
Steps: []resource.TestStep{
Expand Down

0 comments on commit d7cf40f

Please sign in to comment.