diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a73721..cdaaf65 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,12 +6,12 @@ name: Tests on: pull_request: paths-ignore: - - 'README.md' + - "README.md" push: branches: - - 'main' + - "main" tags: - - 'v*' + - "v*" env: AWS_REGION: "us-west-2" @@ -31,7 +31,7 @@ jobs: - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: - go-version: '1.20' + go-version: "1.20" cache: true - run: go mod download - run: go build -v . @@ -62,7 +62,7 @@ jobs: - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: - go-version: '1.20' + go-version: "1.20" cache: true - run: go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs generate --provider-name cdo --rendered-provider-name "CDO Provider" --rendered-website-dir ../docs - name: git diff @@ -70,7 +70,7 @@ jobs: git diff --compact-summary --exit-code || \ (echo; echo "Unexpected difference in directories after docs generation. Run 'go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs generate --provider-name cdo --rendered-provider-name \"CDO Provider\" --rendered-website-dir ../docs' command from the provider directory and commit."; exit 1) - # Run unit tests + # Run unit tests unit-test: name: Terraform Client Unit Tests needs: build @@ -85,7 +85,7 @@ jobs: - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: - go-version: '1.20' + go-version: "1.20" cache: true - name: Run Go Test run: go test ./... @@ -100,28 +100,28 @@ jobs: run: working-directory: provider timeout-minutes: 15 - concurrency: "ci" # fixed group so that it never parallel, even in different PR + concurrency: "ci" # fixed group so that it never parallel, even in different PR strategy: fail-fast: false - max-parallel: 1 # acceptance tests create real infra, so no parallel run is enabled + max-parallel: 1 # acceptance tests create real infra, so no parallel run is enabled matrix: # list whatever Terraform versions here you would like to support terraform: - - '1.3.*' - - '1.4.*' - - '1.5.*' + - "1.3.*" + - "1.4.*" + - "1.5.*" steps: - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: - go-version: '1.20' + go-version: "1.20" cache: true - uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36 # v3.0.0 with: terraform_version: ${{ matrix.terraform }} terraform_wrapper: false - run: go mod download - - run: cat .github-action.env >> $GITHUB_ENV # https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables + - run: cat .github-action.env >> $GITHUB_ENV # https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables - env: TF_ACC: "1" ACC_TEST_CISCO_CDO_API_TOKEN: ${{ secrets.ACC_TEST_CISCO_CDO_API_TOKEN }} @@ -129,7 +129,7 @@ jobs: ASA_RESOURCE_SDC_PASSWORD: ${{ secrets.ASA_RESOURCE_SDC_PASSWORD }} DUO_ADMIN_PANEL_RESOURCE_INTEGRATION_KEY: ${{ secrets.DUO_ADMIN_PANEL_RESOURCE_INTEGRATION_KEY }} DUO_ADMIN_PANEL_RESOURCE_SECRET_KEY: ${{ secrets.DUO_ADMIN_PANEL_RESOURCE_SECRET_KEY }} - run: go test -v -cover ./... + run: go test -v -cover -p 1 -run "TestAcc.*" ./... timeout-minutes: 10 tag-release-version: name: "Tag Release Version" @@ -149,4 +149,4 @@ jobs: if: github.ref == 'refs/heads/main' needs: [tag-release-version] uses: ./.github/workflows/module-release.yml - secrets: inherit \ No newline at end of file + secrets: inherit diff --git a/provider/GNUmakefile b/provider/GNUmakefile index 2808b76..34442cf 100644 --- a/provider/GNUmakefile +++ b/provider/GNUmakefile @@ -9,4 +9,4 @@ export .PHONY: testacc testacc: TF_ACC=1 \ - go test ./... -v $(TESTARGS) -timeout 120m -count 1 \ No newline at end of file + go test ./... -v $(TESTARGS) -timeout 120m -count 1 -p 1 -run "TestAcc.*" \ No newline at end of file diff --git a/provider/internal/tenantsettings/data_source_test.go b/provider/internal/tenantsettings/data_source_test.go index f6338cd..85f11b8 100644 --- a/provider/internal/tenantsettings/data_source_test.go +++ b/provider/internal/tenantsettings/data_source_test.go @@ -22,11 +22,11 @@ func TestAccTenantSettingsDataSource(t *testing.T) { resource.TestCheckResourceAttr("data.cdo_tenant_settings.test", "id", acctest.Env.TenantSettingsTenantUid()), resource.TestCheckResourceAttr("data.cdo_tenant_settings.test", "change_request_support_enabled", "false"), resource.TestCheckResourceAttr("data.cdo_tenant_settings.test", "auto_accept_device_changes_enabled", "false"), - resource.TestCheckResourceAttr("data.cdo_tenant_settings.test", "web_analytics_enabled", "true"), + resource.TestCheckResourceAttr("data.cdo_tenant_settings.test", "web_analytics_enabled", "false"), resource.TestCheckResourceAttr("data.cdo_tenant_settings.test", "scheduled_deployments_enabled", "false"), resource.TestCheckResourceAttr("data.cdo_tenant_settings.test", "deny_cisco_support_access_to_tenant_enabled", "false"), - resource.TestCheckResourceAttr("data.cdo_tenant_settings.test", "multi_cloud_defense_enabled", "true"), - resource.TestCheckResourceAttr("data.cdo_tenant_settings.test", "auto_discover_on_prem_fmcs_enabled", "true"), + resource.TestCheckResourceAttr("data.cdo_tenant_settings.test", "multi_cloud_defense_enabled", "false"), + resource.TestCheckResourceAttr("data.cdo_tenant_settings.test", "auto_discover_on_prem_fmcs_enabled", "false"), resource.TestCheckResourceAttr("data.cdo_tenant_settings.test", "conflict_detection_interval", string(settings.ConflictDetectionIntervalEvery24Hours)), ), },