Skip to content

Commit

Permalink
Fix: Terraform Tests (#66)
Browse files Browse the repository at this point in the history
* initial commit

* modify timeout-minutes

* install gcc
  • Loading branch information
joshuajerin authored Dec 11, 2024
1 parent 2a60969 commit 78c5c7d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- self-hosted
- dind

timeout-minutes: 20
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
Expand All @@ -75,12 +75,13 @@ jobs:
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
- run: sudo apt-get update && sudo apt-get install -y build-essential gcc
- run: go mod download
- env:
TF_ACC: "1"
TEMBO_ACCESS_TOKEN: ${{ secrets.TEMBO_ACCESS_TOKEN }}
ORG_ID: ${{ secrets.ORG_ID }}
TEMBO_HOST: ${{ secrets.TEMBO_HOST }}
TEMBO_DATA_HOST: ${{ secrets.TEMBO_DATA_HOST }}
run: go test -v -cover -timeout 20m ./internal/provider/
timeout-minutes: 20
run: go test -v -cover -timeout 30m ./internal/provider/
timeout-minutes: 30
6 changes: 3 additions & 3 deletions internal/provider/instance_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ func TestTemboInstanceResource(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "connection_pooler.pooler.parameters.default_pool_size", "100"),
),
},
// Wait for 6 minutes to ensure that the initial backup has gone through
// Wait for 10 minutes to ensure that the initial backup has gone through
{
Config: testProviderConfig() + testInstanceResourceCreateConfig(instanceName, orgId),
Check: resource.ComposeTestCheckFunc(
func(s *terraform.State) error {
fmt.Println("Waiting for 6 minutes before checking first_recoverability_time...")
time.Sleep(6 * time.Minute)
fmt.Println("Waiting for 10 minutes before checking first_recoverability_time...")
time.Sleep(10 * time.Minute)
return nil
},
),
Expand Down

0 comments on commit 78c5c7d

Please sign in to comment.