Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "temporarily skip ipranges test" #848

Merged
merged 1 commit into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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