Skip to content

Commit

Permalink
Merge pull request #848 from hashicorp/brandonc/revert_ipranges_skip
Browse files Browse the repository at this point in the history
Revert "temporarily skip ipranges test"
  • Loading branch information
brandonc committed Apr 12, 2023
2 parents 45f98f6 + 3e724d7 commit 6d4f5f0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
2 changes: 0 additions & 2 deletions tfe/data_source_ip_ranges_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ import (
"fmt"
"regexp"
"testing"
"time"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
)

func TestAccTFEIPRangesDataSource_basic(t *testing.T) {
skipIfEnterprise(t)
skipIfBefore(t, time.Date(2023, time.June, 1, 0, 0, 0, 0, time.Local))
ipRegex := regexp.MustCompile(`^([\d]{1,3}\.){3}[\d]{1,3}/[\d]{1,3}$`)

resource.Test(t, resource.TestCase{
Expand Down
11 changes: 0 additions & 11 deletions tfe/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,6 @@ func skipIfEnterprise(t *testing.T) {
}
}

// Temporarily skip a test that may be experiencing API errors. This method
// purposefully errors after the set date to remind contributors to remove this check
// and verify that the API errors are no longer occurring.
func skipIfBefore(t *testing.T, d time.Time) {
if time.Now().After(d) {
t.Fatalf("This test was temporarily skipped and has now expired. Remove this check to run this test.")
} else {
t.Skipf("Temporarily skipping test due to external issues: %s", t.Name())
}
}

func skipUnlessRunTasksDefined(t *testing.T) {
if value, ok := os.LookupEnv(RunTasksURLEnvName); !ok || value == "" {
t.Skipf("Skipping tests for Run Tasks. Set '%s' to enabled this tests.", RunTasksURLEnvName)
Expand Down

0 comments on commit 6d4f5f0

Please sign in to comment.