Skip to content

Commit 41956d5

Browse files
Merge pull request GoogleCloudPlatform#2832 from jasonvigil/fix-sqlinstance-datacacheconfig
fix: Adjust sqlinstance-datacacheconfig test case for tf controller
2 parents 9569937 + ad414ca commit 41956d5

File tree

3 files changed

+10
-3
lines changed
  • pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance

3 files changed

+10
-3
lines changed

pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-datacacheconfig-direct/create.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ spec:
2525
settings:
2626
dataCacheConfig:
2727
dataCacheEnabled: false
28+
# The legacy terraform-based reconciler cannot update ENTERPRISE -> ENTERPRISE_PLUS
29+
# edition at the same time as changing dataCacheEnabled false -> true. However, the
30+
# direct controller is able to perform this update. So, for the direct controller
31+
# test case, we will specify `edition: ENTERPRISE` here.
2832
edition: ENTERPRISE
2933
# Location preference is not actually a required field. However, setting it for tests
3034
# helps with with normalizing the GCP responses, because otherwise GCP chooses a zone

pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-datacacheconfig/_http.log

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terr
4141
"availabilityType": "ZONAL",
4242
"dataCacheConfig": {},
4343
"dataDiskType": "PD_SSD",
44-
"edition": "ENTERPRISE",
44+
"edition": "ENTERPRISE_PLUS",
4545
"locationPreference": {
4646
"zone": "us-central1-a"
4747
},
@@ -219,7 +219,7 @@ X-Xss-Protection: 0
219219
"dataDiskSizeGb": "10",
220220
"dataDiskType": "PD_SSD",
221221
"deletionProtectionEnabled": false,
222-
"edition": "ENTERPRISE",
222+
"edition": "ENTERPRISE_PLUS",
223223
"ipConfiguration": {
224224
"authorizedNetworks": [],
225225
"ipv4Enabled": true,

pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-datacacheconfig/create.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ spec:
2424
settings:
2525
dataCacheConfig:
2626
dataCacheEnabled: false
27-
edition: ENTERPRISE
27+
# The legacy terraform-based reconciler cannot update ENTERPRISE -> ENTERPRISE_PLUS
28+
# edition at the same time as changing dataCacheEnabled false -> true. Therefore,
29+
# we must set `edition: ENTERPRISE_PLUS` here.
30+
edition: ENTERPRISE_PLUS
2831
# Location preference is not actually a required field. However, setting it for tests
2932
# helps with with normalizing the GCP responses, because otherwise GCP chooses a zone
3033
# preference based on availability. Therefore it could potentially vary if not

0 commit comments

Comments
 (0)