Skip to content

Commit f3977d1

Browse files
committed
Temporarily skip VCS related tests
1 parent 96b1b2f commit f3977d1

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

internal/provider/helper_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,18 @@ func skipUnlessBeta(t *testing.T) {
206206
}
207207
}
208208

209+
// Temporarily skip a test that may be experiencing API errors. This method
210+
// purposefully errors after the set date to remind contributors to remove this check
211+
// and verify that the API errors are no longer occurring.
212+
func skipUnlessAfterDate(t *testing.T, d time.Time) {
213+
today := time.Now()
214+
if today.After(d) {
215+
t.Fatalf("This test was temporarily skipped and has now expired. Remove this check to run this test.")
216+
} else {
217+
t.Skipf("Temporarily skipping test due to external issues: %s", t.Name())
218+
}
219+
}
220+
209221
func enterpriseEnabled() bool {
210222
return os.Getenv("ENABLE_TFE") == "1"
211223
}

internal/provider/provider_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@ func TestConfigureEnvOrganization(t *testing.T) {
213213
// The TFE Provider tests use these environment variables, which are set in the
214214
// GitHub Action workflow file .github/workflows/ci.yml.
215215
func testAccGithubPreCheck(t *testing.T) {
216+
skipUnlessAfterDate(t, time.Date(2024, 5, 24, 0, 0, 0, 0, time.UTC))
217+
216218
if envGithubToken == "" {
217219
t.Skip("Please set GITHUB_TOKEN to run this test")
218220
}

0 commit comments

Comments
 (0)