Skip to content

Commit

Permalink
Merge pull request #1461 from hashicorp/brandonc/remove_skip_date
Browse files Browse the repository at this point in the history
Remove skipUnlessAfterDate skips
  • Loading branch information
brandonc authored Sep 4, 2024
2 parents 842b99b + a0bd143 commit 275c68c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
7 changes: 5 additions & 2 deletions internal/provider/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ func testAccPreCheck(t *testing.T) {
}
}

func TestSkipUnlessAfterDate(t *testing.T) {
skipUnlessAfterDate(t, time.Date(2199, 1, 1, 0, 0, 0, 0, time.UTC))
t.Fatal("This test should have been skipped (Unless it's 2199!)")
}

func TestConfigureEnvOrganization(t *testing.T) {
rInt := rand.New(rand.NewSource(time.Now().UnixNano())).Int()
originalTFEOrganization := os.Getenv("TFE_ORGANIZATION")
Expand Down Expand Up @@ -213,8 +218,6 @@ func TestConfigureEnvOrganization(t *testing.T) {
// The TFE Provider tests use these environment variables, which are set in the
// GitHub Action workflow file .github/workflows/ci.yml.
func testAccGithubPreCheck(t *testing.T) {
skipUnlessAfterDate(t, time.Date(2024, 9, 1, 0, 0, 0, 0, time.UTC))

if envGithubToken == "" {
t.Skip("Please set GITHUB_TOKEN to run this test")
}
Expand Down
2 changes: 0 additions & 2 deletions internal/provider/resource_tfe_registry_module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1072,8 +1072,6 @@ func testAccCheckTFERegistryModuleDestroy(s *terraform.State) error {
}

func testAccPreCheckTFERegistryModule(t *testing.T) {
skipUnlessAfterDate(t, time.Date(2024, 9, 1, 0, 0, 0, 0, time.UTC))

if envGithubToken == "" {
t.Skip("Please set GITHUB_TOKEN to run this test")
}
Expand Down
8 changes: 0 additions & 8 deletions internal/provider/resource_tfe_workspace_run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ import (
)

func TestAccTFEWorkspaceRun_withApplyOnlyBlock(t *testing.T) {
// Currently, tflocal cloud box is incapable of running terraform more than once at a time
// due to the use of the raw_exec nomad driver.
skipUnlessAfterDate(t, time.Date(2025, 5, 1, 0, 0, 0, 0, time.UTC))

rInt := rand.New(rand.NewSource(time.Now().UnixNano())).Int()

tfeClient, err := getClientUsingEnv()
Expand Down Expand Up @@ -69,10 +65,6 @@ func TestAccTFEWorkspaceRun_withApplyOnlyBlock(t *testing.T) {
}

func TestAccTFEWorkspaceRun_withBothApplyAndDestroyBlocks(t *testing.T) {
// Currently, tflocal cloud box is incapable of running terraform more than once at a time
// due to the use of the raw_exec nomad driver.
skipUnlessAfterDate(t, time.Date(2025, 5, 1, 0, 0, 0, 0, time.UTC))

rInt := rand.New(rand.NewSource(time.Now().UnixNano())).Int()

tfeClient, err := getClientUsingEnv()
Expand Down

0 comments on commit 275c68c

Please sign in to comment.