From d63cb7afec02be30fd89839af7ffe6c36cb0877c Mon Sep 17 00:00:00 2001 From: Chris Hajas Date: Thu, 20 Jul 2017 09:34:50 -0700 Subject: [PATCH] Fix backup/restore tests for dumping database grants The changes in commit bdafd0ce885064f73774579302a0905cfea06780 should not be tested against the backup43/restore5 test since this code is not yet present in 4.3. Additionally, query the 'template1' database when verifying roles exist. --- .../behave/mgmt_utils/backup_and_restore_backups.feature | 1 + .../behave/mgmt_utils/backup_and_restore_restores.feature | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gpMgmt/test/behave/mgmt_utils/backup_and_restore_backups.feature b/gpMgmt/test/behave/mgmt_utils/backup_and_restore_backups.feature index bb4d602791..47a2711705 100644 --- a/gpMgmt/test/behave/mgmt_utils/backup_and_restore_backups.feature +++ b/gpMgmt/test/behave/mgmt_utils/backup_and_restore_backups.feature @@ -1682,6 +1682,7 @@ Feature: Validate command line arguments And the timestamp from gpcrondump is stored @ddpartIII + @skip_for_gpdb_43 Scenario: 119 Backup database grants Given the backup test is initialized with database "bkdb119" And the user runs """psql -c "DROP ROLE IF EXISTS user_grant" bkdb119""" diff --git a/gpMgmt/test/behave/mgmt_utils/backup_and_restore_restores.feature b/gpMgmt/test/behave/mgmt_utils/backup_and_restore_restores.feature index eb56bbb2cb..9b197e829d 100644 --- a/gpMgmt/test/behave/mgmt_utils/backup_and_restore_restores.feature +++ b/gpMgmt/test/behave/mgmt_utils/backup_and_restore_restores.feature @@ -108,8 +108,8 @@ Feature: Validate command line arguments Given the old timestamps are read from json When the user runs gpdbrestore without -e with the stored timestamp and options "-G only" Then gpdbrestore should return a return code of 0 - And verify that a role "foo_user" exists in database "bkdb11" - And the user runs "psql -c 'DROP ROLE foo_user' bkdb11" + And verify that a role "foo_user" exists in database "template1" + And the user runs "psql -c 'DROP ROLE foo_user' template1" @valgrind Scenario: 12 Valgrind test of gp_restore for incremental backup @@ -1147,6 +1147,7 @@ Feature: Validate command line arguments And verify that "blocksize=65536" appears in the datconfig for database "bkdb118" @ddpartIII + @skip_for_gpdb_43 Scenario: 119 Backup database grants Given the old timestamps are read from json When the user runs gpdbrestore -e with the stored timestamp -- GitLab