Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Commit d77bae8

Browse files
committed
test: fix PITR-lite system tests
1 parent c1b407d commit d77bae8

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

tests/system/test_system.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ def test_create_database_pitr_invalid_retention_period(self):
339339
retention_period = "0d"
340340
ddl_statements = [
341341
"ALTER DATABASE {}"
342-
" SET OPTIONS (version_retention_period = {})".format(
342+
" SET OPTIONS (version_retention_period = '{}')".format(
343343
temp_db_id, retention_period
344344
)
345345
]
@@ -358,7 +358,7 @@ def test_create_database_pitr_success(self):
358358
retention_period = "7d"
359359
ddl_statements = [
360360
"ALTER DATABASE {}"
361-
" SET OPTIONS (version_retention_period = {})".format(
361+
" SET OPTIONS (version_retention_period = '{}')".format(
362362
temp_db_id, retention_period
363363
)
364364
]
@@ -386,7 +386,7 @@ def test_create_database_pitr_success(self):
386386
"WHERE SCHEMA_NAME = '' AND OPTION_NAME = 'version_retention_period'"
387387
)
388388
for result in results:
389-
self.assertEqual(result, retention_period)
389+
self.assertEqual(result[0], retention_period)
390390

391391
def test_table_not_found(self):
392392
temp_db_id = "temp_db" + unique_resource_id("_")
@@ -454,12 +454,11 @@ def test_update_database_ddl_pitr_invalid(self):
454454
# We want to make sure the operation completes.
455455
create_op.result(240) # raises on failure / timeout.
456456

457-
temp_db.reload()
458457
self.assertIsNone(temp_db.version_retention_period)
459458

460459
ddl_statements = DDL_STATEMENTS + [
461460
"ALTER DATABASE {}"
462-
" SET OPTIONS (version_retention_period = {})".format(
461+
" SET OPTIONS (version_retention_period = '{}')".format(
463462
temp_db_id, retention_period
464463
)
465464
]
@@ -480,12 +479,11 @@ def test_update_database_ddl_pitr_success(self):
480479
# We want to make sure the operation completes.
481480
create_op.result(240) # raises on failure / timeout.
482481

483-
temp_db.reload()
484482
self.assertIsNone(temp_db.version_retention_period)
485483

486484
ddl_statements = DDL_STATEMENTS + [
487485
"ALTER DATABASE {}"
488-
" SET OPTIONS (version_retention_period = {})".format(
486+
" SET OPTIONS (version_retention_period = '{}')".format(
489487
temp_db_id, retention_period
490488
)
491489
]

0 commit comments

Comments
 (0)