From d56f1b17f362f1682364ede3741136fc49670077 Mon Sep 17 00:00:00 2001 From: Khushboo Vashi Date: Mon, 2 Jul 2018 15:53:19 +0100 Subject: [PATCH] Fix restoring of restore options for sections. Fixes #3362 --- docs/en_US/release_notes_3_2.rst | 1 + .../tests/test_restore_create_job_unit_test.py | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/en_US/release_notes_3_2.rst b/docs/en_US/release_notes_3_2.rst index 263039fb3..48d47b1c3 100644 --- a/docs/en_US/release_notes_3_2.rst +++ b/docs/en_US/release_notes_3_2.rst @@ -18,4 +18,5 @@ Bug fixes | `Bug #3309 `_ - Fix Directory format support for backups. | `Bug #3319 `_ - Cleanup and fix handling of Query Tool Cancel button status. +| `Bug #3362 `_ - Fix restoring of restore options for sections. | `Bug #3457 `_ - Fix debugging of procedures in EPAS packages. diff --git a/web/pgadmin/tools/restore/tests/test_restore_create_job_unit_test.py b/web/pgadmin/tools/restore/tests/test_restore_create_job_unit_test.py index 223d51644..23a1cf04e 100644 --- a/web/pgadmin/tools/restore/tests/test_restore_create_job_unit_test.py +++ b/web/pgadmin/tools/restore/tests/test_restore_create_job_unit_test.py @@ -104,8 +104,9 @@ class RestoreCreateJobTest(BaseTestGenerator): only_schema=True ), url='/restore/job/{0}', - # Please include sections data here, right now this is a bug - expected_cmd_opts=['--verbose', '--jobs', '2'], + expected_cmd_opts=['--verbose', '--jobs', '2', + '--section=pre-data', '--section=data', + '--section=post-data'], not_expected_cmd_opts=[], # Below options should be enabled once we fix the issue #3368 # not_expected_cmd_opts=['--data-only', '--schema-only'], @@ -167,9 +168,9 @@ class RestoreCreateJobTest(BaseTestGenerator): only_data=False ), url='/restore/job/{0}', - # Add '--no-privileges' to the expected_cmd once #3363 fixed expected_cmd_opts=['--no-owner', - '--no-tablespaces'], + '--no-tablespaces', + '--no-privileges'], not_expected_cmd_opts=[], expected_exit_code=[0, None] )), @@ -224,9 +225,8 @@ class RestoreCreateJobTest(BaseTestGenerator): only_schema=False ), url='/restore/job/{0}', - # Add '--no-data-for-failed-tables' into - # expected_cmd_opts once #3363 fixed - expected_cmd_opts=['--disable-triggers'], + expected_cmd_opts=['--disable-triggers', + '--no-data-for-failed-tables'], not_expected_cmd_opts=[], expected_exit_code=[0, None] )),