Skip to content

Commit

Permalink
Add env var for index type test
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharon Nam authored and Sharon Nam committed Mar 28, 2024
1 parent fb969c9 commit ce99f6f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/acc-test-environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Environment variables (beyond standard AWS Go SDK ones) used by acceptance testi
| `QUICKSIGHT_NAMESPACE` | QuickSight namespace name for testing. |
| `QUICKSIGHT_ATHENA_TESTING_ENABLED` | Enable QuickSight tests dependent on Amazon Athena resources. |
| `ROUTE53DOMAINS_DOMAIN_NAME` | Registered domain for Route 53 Domains testing. |
| `RESOURCEEXPLORER_INDEX_TYPE` | Index Type for Resource Explorer 2 Search datasource testing. |
| `SAGEMAKER_IMAGE_VERSION_BASE_IMAGE` | SageMaker base image to use for tests. |
| `SERVICEQUOTAS_INCREASE_ON_CREATE_QUOTA_CODE` | Quota Code for Service Quotas testing (submits support case). |
| `SERVICEQUOTAS_INCREASE_ON_CREATE_SERVICE_CODE` | Service Code for Service Quotas testing (submits support case). |
Expand Down
4 changes: 4 additions & 0 deletions internal/service/resourceexplorer2/search_data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package resourceexplorer2_test

import (
"fmt"
"os"
"testing"

sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest"
Expand Down Expand Up @@ -47,6 +48,9 @@ func testAccSearchDataSource_basic(t *testing.T) {
// Can only be run once a day as changing the index type has a 24 hr cooldown
func testAccSearchDataSource_IndexType(t *testing.T) {
ctx := acctest.Context(t)
if os.Getenv("RESOURCEEXPLORER_INDEX_TYPE") != "AGGREGATOR" {
t.Skip("Environment variable RESOURCEEXPLORER_INDEX_TYPE is not set to AGGREGATOR. Before setting this environment variable and running this test, ensure no tests with a LOCAL index type also need to run. Changing the index type will trigger a cool down period of 24 hours.")
}
if testing.Short() {
t.Skip("skipping long-running test in short mode")
}
Expand Down

0 comments on commit ce99f6f

Please sign in to comment.