Skip to content

Commit 3b944f7

Browse files
authored
acc: update tests for lakebase instance and catalog (#3543)
## Changes <!-- Brief summary of your changes that is easy to understand --> - expect `effective_enable_pg_native_login` field to be returned when getting a lakebase instance - remove the call to describe the database instance ## Why <!-- Why are these changes needed? Provide the context that the reviewer might be missing. For example, were there any decisions behind the change that are not reflected in the code itself? --> - Lakebase API started to return `effective_enable_pg_native_login` field on Sep 3rd 2025 - Reading the database instance is out of scope for the lakebase catalog test ## Tests <!-- How have you tested the changes? --> Ran the tests for lakebase instance and catalog from local machine against one cloud environment <!-- If your PR needs to be included in the release notes for next release, add a separate entry in NEXT_CHANGELOG.md as part of your PR. -->
1 parent 863f940 commit 3b944f7

File tree

4 files changed

+3
-17
lines changed

4 files changed

+3
-17
lines changed

acceptance/bundle/deploy/lakebase/database-catalog/output.txt

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,6 @@ Deploying resources...
2828
Updating deployment state...
2929
Deployment complete!
3030

31-
>>> [CLI] database get-database-instance test-db-catalog-[UNIQUE_NAME]
32-
{
33-
"capacity": "CU_1",
34-
"creation_time": "[TIMESTAMP]Z",
35-
"creator": "[USERNAME]",
36-
"effective_enable_readable_secondaries": false,
37-
"effective_node_count": 1,
38-
"effective_retention_window_in_days": 7,
39-
"effective_stopped": false,
40-
"name": "test-db-catalog-[UNIQUE_NAME]",
41-
"pg_version": "PG_VERSION_16",
42-
"state": "AVAILABLE",
43-
"uid": "[UUID]"
44-
}
45-
4631
>>> [CLI] bundle summary
4732
Name: deploy-lakebase-catalog-[UNIQUE_NAME]
4833
Target: default

acceptance/bundle/deploy/lakebase/database-catalog/script

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,4 @@ trace $CLI bundle validate
1010
# URL is excluded because some cloud envs add an ?0= query param and some don't
1111
trace $CLI bundle summary | grep -v "URL"
1212
trace $CLI bundle deploy
13-
# _dns fields are excluded since they differ between cloud envs
14-
trace $CLI database get-database-instance "test-db-catalog-${UNIQUE_NAME}" | jq 'del(.read_only_dns, .read_write_dns)'
1513
trace $CLI bundle summary | grep -v "URL"

acceptance/bundle/deploy/lakebase/database-instance/single-instance/output.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Deployment complete!
3131
"capacity": "CU_1",
3232
"creation_time": "[TIMESTAMP]Z",
3333
"creator": "[USERNAME]",
34+
"effective_enable_pg_native_login": false,
3435
"effective_enable_readable_secondaries": false,
3536
"effective_node_count": 1,
3637
"effective_retention_window_in_days": 7,

libs/testserver/database_instances.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ func (s *FakeWorkspace) DatabaseInstanceCreate(req Request) Response {
3131
databaseInstance.CreationTime = time.Now().UTC().Format(time.RFC3339)
3232
databaseInstance.EffectiveEnableReadableSecondaries = false
3333
databaseInstance.EffectiveStopped = false
34+
databaseInstance.EffectiveEnablePgNativeLogin = false
3435

3536
s.DatabaseInstances[databaseInstance.Name] = databaseInstance
3637

@@ -59,6 +60,7 @@ func DatabaseInstanceMapGet(w *FakeWorkspace, collection map[string]database.Dat
5960
// Explicitly set boolean fields that should always be present
6061
result["effective_enable_readable_secondaries"] = value.EffectiveEnableReadableSecondaries
6162
result["effective_stopped"] = value.EffectiveStopped
63+
result["effective_enable_pg_native_login"] = value.EffectiveEnablePgNativeLogin
6264

6365
return Response{
6466
Body: result,

0 commit comments

Comments
 (0)