diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 86af43d..3baffd6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,24 +17,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true - jobs: build: name: Build runs-on: ubuntu-latest timeout-minutes: 5 steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: .go-version - cache: true - - name: Get dependencies - run: go mod download - - name: Build - run: go build -v . + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: .go-version + cache: true + - name: Get dependencies + run: go mod download + - name: Build + run: go build -v . generate: runs-on: ubuntu-latest @@ -60,26 +59,26 @@ jobs: matrix: terraform: - '1.3.*' - - '1.6.*' - '1.7.*' - '1.8.*' + - '1.9.*' include: - terraform: '1.3.*' domain: 'dnsimple-1-0-terraform.bio' registrant_contact_id: 10854 - registrant_change_domain: 'peoa1hvrl5s7q7os1bqadhd29uar81nnc4m0oyaloxex9kapsn20u6nr8z6l5h.eu' - - terraform: '1.6.*' + registrant_change_domain: 'dnsimple-tf-ci-1.eu' + - terraform: '1.7.*' domain: 'dnsimple-1-1-terraform.bio' registrant_contact_id: 10169 - registrant_change_domain: '9qy9lpesl2f2o5ya45zyujrggori1mh8sl6k2oz37usv48lhn3ziistg3u5kgv.eu' - - terraform: '1.7.*' + registrant_change_domain: 'dnsimple-tf-ci-2.eu' + - terraform: '1.8.*' domain: 'dnsimple-1-2-terraform.bio' registrant_contact_id: 10854 - registrant_change_domain: 'lqyivkga231hkiqihu0k7bjic2ixd01xs5vex8rmn2iaw0l7gxvhcbicigpfm3.eu' - - terraform: '1.8.*' + registrant_change_domain: 'dnsimple-tf-ci-3.eu' + - terraform: '1.9.*' domain: 'dnsimple-1-4-terraform.bio' registrant_contact_id: 10169 - registrant_change_domain: 'z0u2w48bo5fzgdsh1g7zjpflbpt0tiyl6tmc75ltzzm6dbphghrgepbaxs6zrm.eu' + registrant_change_domain: 'dnsimple-tf-ci-4.eu' steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 @@ -92,7 +91,7 @@ jobs: terraform_wrapper: false - run: go mod download - env: - TF_ACC: "1" + TF_ACC: '1' DNSIMPLE_SANDBOX: true DNSIMPLE_ACCOUNT: ${{ secrets.DNSIMPLE_ACCOUNT }} DNSIMPLE_TOKEN: ${{ secrets.DNSIMPLE_TOKEN }} diff --git a/.go-version b/.go-version index ae7bbdf..14bee92 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.21.10 +1.23.2 diff --git a/go.mod b/go.mod index bd4a2e2..4cdebfb 100644 --- a/go.mod +++ b/go.mod @@ -89,6 +89,6 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -go 1.21 +go 1.23 -toolchain go1.21.10 +toolchain go1.23.2 diff --git a/internal/framework/resources/registered_domain/resource_test.go b/internal/framework/resources/registered_domain/resource_test.go index e5ef702..34e2b6c 100644 --- a/internal/framework/resources/registered_domain/resource_test.go +++ b/internal/framework/resources/registered_domain/resource_test.go @@ -160,7 +160,7 @@ func TestAccRegisteredDomainResource_WithOptions(t *testing.T) { if err != nil { t.Fatal(err) } - domainName := utils.RandomString(62) + ".com" + domainName := utils.RandomString(62) + ".pw" resourceName := "dnsimple_registered_domain.test" resource.Test(t, resource.TestCase{ diff --git a/tools/sweep/main.go b/tools/sweep/main.go index 18a5266..c054559 100644 --- a/tools/sweep/main.go +++ b/tools/sweep/main.go @@ -178,7 +178,10 @@ func cleanupDomains(ctx context.Context, dnsimpleClient *dnsimple.Client, accoun fmt.Printf("Deleting domain %s\n", domain.Name) _, err := dnsimpleClient.Domains.DeleteDomain(ctx, account, domain.Name) - if err != nil { + if err != nil && strings.Contains(err.Error(), "The domain cannot be deleted because it is either being registered or is transferring in") { + fmt.Printf("Skipping domain %s because it is being registered or is transferring in\n", domain.Name) + continue + } else if err != nil { panic(err) } }