Skip to content

Commit

Permalink
skip for default account
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz committed Sep 20, 2022
1 parent 4a8f21f commit 0a71f36
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ func testPagesProjectFull(resourceID, accountID, projectName, repoOwner, repoNam
}

func TestAccCloudflarePagesProject_Import(t *testing.T) {
skipPagesProjectForNonConfiguredDefaultAccount(t)

rnd := generateRandomResourceName()
name := fmt.Sprintf("cloudflare_pages_project.%s", rnd)
accountID := os.Getenv("CLOUDFLARE_ACCOUNT_ID")
Expand Down
10 changes: 10 additions & 0 deletions internal/provider/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,13 @@ func skipV1WAFTestForNonConfiguredDefaultZone(t *testing.T) {
t.Skipf("Skipping acceptance test as %s is using WAF v2 and cannot assert v1 resource configurations", testAccCloudflareZoneID)
}
}

// skipPagesProjectForNonConfiguredDefaultAccount ignores the pages project tests
// due to not having a dedicated GitHub account setup in Cloudflare for the
// default account. This will allow those who intentionally want to run the test
// to do so while keeping CI sane.
func skipPagesProjectForNonConfiguredDefaultAccount(t *testing.T) {
if os.Getenv("CLOUDFLARE_ACCOUNT_ID") == testAccCloudflareAccountID {
t.Skipf("Skipping acceptance test as %s is using pages project that isn't setup for CI", testAccCloudflareAccountID)
}
}

0 comments on commit 0a71f36

Please sign in to comment.