Skip to content

Commit

Permalink
Merge pull request #781 from cloudflare/dhaynespls/remove-aop-tokens-…
Browse files Browse the repository at this point in the history
…hack

Remove AOP API Tokens gate as it's now supported in production
  • Loading branch information
jacobbednarz authored Sep 1, 2020
2 parents 71f438d + 9b202b9 commit 8ecaef1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@ import (
)

func TestAccCloudflareAuthenticatedOriginPullsCertificatePerZone(t *testing.T) {
// Temporarily unset CLOUDFLARE_API_TOKEN if it is set as the AOP API
// does not yet support the API tokens and it results in
// misleading state error messages.
if os.Getenv("CLOUDFLARE_API_TOKEN") != "" {
defer func(apiToken string) {
os.Setenv("CLOUDFLARE_API_TOKEN", apiToken)
}(os.Getenv("CLOUDFLARE_API_TOKEN"))
os.Setenv("CLOUDFLARE_API_TOKEN", "")
}
var perZoneAOP cloudflare.PerZoneAuthenticatedOriginPullsCertificateDetails
zoneID := os.Getenv("CLOUDFLARE_ZONE_ID")
rnd := generateRandomResourceName()
Expand All @@ -46,15 +37,6 @@ func TestAccCloudflareAuthenticatedOriginPullsCertificatePerZone(t *testing.T) {
}

func TestAccCloudflareAuthenticatedOriginPullsCertificatePerHostname(t *testing.T) {
// Temporarily unset CLOUDFLARE_API_TOKEN if it is set as the AOP API
// does not yet support the API tokens and it results in
// misleading state error messages.
if os.Getenv("CLOUDFLARE_API_TOKEN") != "" {
defer func(apiToken string) {
os.Setenv("CLOUDFLARE_API_TOKEN", apiToken)
}(os.Getenv("CLOUDFLARE_API_TOKEN"))
os.Setenv("CLOUDFLARE_API_TOKEN", "")
}
var perZoneAOP cloudflare.PerHostnameAuthenticatedOriginPullsCertificateDetails
zoneID := os.Getenv("CLOUDFLARE_ZONE_ID")
rnd := generateRandomResourceName()
Expand Down
27 changes: 0 additions & 27 deletions cloudflare/resource_cloudflare_authenticated_origin_pulls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ import (

func TestAccCloudflareAuthenticatedOriginPullsGlobal(t *testing.T) {
t.Parallel()
// Temporarily unset CLOUDFLARE_API_TOKEN if it is set as the AOP API
// does not yet support the API tokens and it results in
// misleading state error messages.
if os.Getenv("CLOUDFLARE_API_TOKEN") != "" {
defer func(apiToken string) {
os.Setenv("CLOUDFLARE_API_TOKEN", apiToken)
}(os.Getenv("CLOUDFLARE_API_TOKEN"))
os.Setenv("CLOUDFLARE_API_TOKEN", "")
}
zoneID := os.Getenv("CLOUDFLARE_ZONE_ID")
rnd := generateRandomResourceName()
name := fmt.Sprintf("cloudflare_authenticated_origin_pulls.%s", rnd)
Expand All @@ -41,15 +32,6 @@ func TestAccCloudflareAuthenticatedOriginPullsGlobal(t *testing.T) {

func TestAccCloudflareAuthenticatedOriginPullsPerZone(t *testing.T) {
t.Parallel()
// Temporarily unset CLOUDFLARE_API_TOKEN if it is set as the AOP API
// does not yet support the API tokens and it results in
// misleading state error messages.
if os.Getenv("CLOUDFLARE_API_TOKEN") != "" {
defer func(apiToken string) {
os.Setenv("CLOUDFLARE_API_TOKEN", apiToken)
}(os.Getenv("CLOUDFLARE_API_TOKEN"))
os.Setenv("CLOUDFLARE_API_TOKEN", "")
}
zoneID := os.Getenv("CLOUDFLARE_ZONE_ID")
rnd := generateRandomResourceName()
name := fmt.Sprintf("cloudflare_authenticated_origin_pulls.%s", rnd)
Expand All @@ -70,15 +52,6 @@ func TestAccCloudflareAuthenticatedOriginPullsPerZone(t *testing.T) {

func TestAccCloudflareAuthenticatedOriginPullsPerHostname(t *testing.T) {
t.Parallel()
// Temporarily unset CLOUDFLARE_API_TOKEN if it is set as the AOP API
// does not yet support the API tokens and it results in
// misleading state error messages.
if os.Getenv("CLOUDFLARE_API_TOKEN") != "" {
defer func(apiToken string) {
os.Setenv("CLOUDFLARE_API_TOKEN", apiToken)
}(os.Getenv("CLOUDFLARE_API_TOKEN"))
os.Setenv("CLOUDFLARE_API_TOKEN", "")
}
zoneID := os.Getenv("CLOUDFLARE_ZONE_ID")
hostname := os.Getenv("CLOUDFLARE_DOMAIN")
rnd := generateRandomResourceName()
Expand Down

0 comments on commit 8ecaef1

Please sign in to comment.