Skip to content

Commit

Permalink
test: fix PITR-lite system tests
Browse files Browse the repository at this point in the history
  • Loading branch information
larkee committed Oct 7, 2020
1 parent c1b407d commit d77bae8
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tests/system/test_system.py
Expand Up @@ -339,7 +339,7 @@ def test_create_database_pitr_invalid_retention_period(self):
retention_period = "0d"
ddl_statements = [
"ALTER DATABASE {}"
" SET OPTIONS (version_retention_period = {})".format(
" SET OPTIONS (version_retention_period = '{}')".format(
temp_db_id, retention_period
)
]
Expand All @@ -358,7 +358,7 @@ def test_create_database_pitr_success(self):
retention_period = "7d"
ddl_statements = [
"ALTER DATABASE {}"
" SET OPTIONS (version_retention_period = {})".format(
" SET OPTIONS (version_retention_period = '{}')".format(
temp_db_id, retention_period
)
]
Expand Down Expand Up @@ -386,7 +386,7 @@ def test_create_database_pitr_success(self):
"WHERE SCHEMA_NAME = '' AND OPTION_NAME = 'version_retention_period'"
)
for result in results:
self.assertEqual(result, retention_period)
self.assertEqual(result[0], retention_period)

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

temp_db.reload()
self.assertIsNone(temp_db.version_retention_period)

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

temp_db.reload()
self.assertIsNone(temp_db.version_retention_period)

ddl_statements = DDL_STATEMENTS + [
"ALTER DATABASE {}"
" SET OPTIONS (version_retention_period = {})".format(
" SET OPTIONS (version_retention_period = '{}')".format(
temp_db_id, retention_period
)
]
Expand Down

0 comments on commit d77bae8

Please sign in to comment.