Skip to content

Commit f781621

Browse files
committed
Configure provider to connect to GCP during tests
1 parent 43d556a commit f781621

6 files changed

+8
-8
lines changed

.github/workflows/terraform_provider.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ jobs:
126126
AWS_SIGNIN_URL: ${{ secrets.CLOUD_ACCOUNT_URL }}
127127
GCP_VPC_PROJECT: ${{ secrets.GCP_VPC_PROJECT }}
128128
GCP_VPC_ID: ${{ secrets.GCP_VPC_ID }}
129-
# TODO
130-
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
129+
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
130+
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}
131131
- name: Generate code coverage report
132132
if: steps.filter.outputs.code-changes == 'true' && (success() || failure())
133133
run: make generate_coverage

provider/provider_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ func testAccAwsPeeringPreCheck(t *testing.T) {
4444
}
4545

4646
func testAccGcpProjectPreCheck(t *testing.T) {
47-
requireEnvironmentVariables(t, "GCP_VPC_PROJECT")
47+
requireEnvironmentVariables(t, "GCP_PROJECT_ID")
4848
}
4949

5050
func testAccGcpCredentialsPreCheck(t *testing.T) {
51-
requireEnvironmentVariables(t, "GOOGLE_APPLICATION_CREDENTIALS")
51+
requireEnvironmentVariables(t, "GOOGLE_CREDENTIALS")
5252
}
5353

5454
func testAccAwsPreExistingTgwCheck(t *testing.T) {

provider/rediscloud_active_active_private_service_connect_endpoint_accepter_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func TestAccResourceRedisCloudActiveActivePrivateServiceConnectEndpointAccepter_
1818
baseName := acctest.RandomWithPrefix(testResourcePrefix) + "-pro-pscea"
1919

2020
const resourceName = "rediscloud_active_active_private_service_connect_endpoint_accepter.accepter"
21-
gcpProjectId := os.Getenv("GCP_VPC_PROJECT")
21+
gcpProjectId := os.Getenv("GCP_PROJECT_ID")
2222

2323
resource.ParallelTest(t, resource.TestCase{
2424
PreCheck: func() { testAccPreCheck(t); testAccGcpProjectPreCheck(t); testAccGcpCredentialsPreCheck(t) },

provider/rediscloud_active_active_private_service_connect_endpoint_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func TestAccResourceRedisCloudActiveActivePrivateServiceConnectEndpoint_CRUDI(t
1616

1717
const resourceName = "rediscloud_active_active_private_service_connect_endpoint.psce"
1818
const datasourceName = "data.rediscloud_active_active_private_service_connect_endpoints.psce"
19-
gcpProjectId := os.Getenv("GCP_VPC_PROJECT")
19+
gcpProjectId := os.Getenv("GCP_PROJECT_ID")
2020
gcpVPCName := fmt.Sprintf("%s-network", baseName)
2121
gcpVPCSubnetName := fmt.Sprintf("%s-subnet", baseName)
2222

provider/rediscloud_private_service_connect_endpoint_accepter_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func TestAccResourceRedisCloudPrivateServiceConnectEndpointAccepter_Create(t *te
1818
baseName := acctest.RandomWithPrefix(testResourcePrefix) + "-pro-pscea"
1919

2020
const resourceName = "rediscloud_private_service_connect_endpoint_accepter.accepter"
21-
gcpProjectId := os.Getenv("GCP_VPC_PROJECT")
21+
gcpProjectId := os.Getenv("GCP_PROJECT_ID")
2222

2323
resource.ParallelTest(t, resource.TestCase{
2424
PreCheck: func() { testAccPreCheck(t); testAccGcpProjectPreCheck(t); testAccGcpCredentialsPreCheck(t) },

provider/rediscloud_private_service_connect_endpoint_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func TestAccResourceRedisCloudPrivateServiceConnectEndpoint_CRUDI(t *testing.T)
1616

1717
const resourceName = "rediscloud_private_service_connect_endpoint.psce"
1818
const datasourceName = "data.rediscloud_private_service_connect_endpoints.psce"
19-
gcpProjectId := os.Getenv("GCP_VPC_PROJECT")
19+
gcpProjectId := os.Getenv("GCP_PROJECT_ID")
2020
gcpVPCName := fmt.Sprintf("%s-network", baseName)
2121
gcpVPCSubnetName := fmt.Sprintf("%s-subnet", baseName)
2222

0 commit comments

Comments
 (0)