public inbox for [email protected]
help / color / mirror / Atom feed[pgAdmin][Patch]: Fixed RM #3362 - Database restore utility does not honour restore options for sections
2+ messages / 2 participants
[nested] [flat]
* [pgAdmin][Patch]: Fixed RM #3362 - Database restore utility does not honour restore options for sections
@ 2018-07-02 05:09 Khushboo Vashi <[email protected]>
2018-07-02 14:56 ` Re: [pgAdmin][Patch]: Fixed RM #3362 - Database restore utility does not honour restore options for sections Dave Page <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Khushboo Vashi @ 2018-07-02 05:09 UTC (permalink / raw)
To: pgadmin-hackers
Hi,
Please find the attached patch to fix RM #3362 : Database restore utility
does not honour restore options for sections.
Thanks,
Khushboo
Attachments:
[text/x-patch] RM_3363.patch (3.6K, 3-RM_3363.patch)
download | inline diff:
diff --git a/web/pgadmin/tools/restore/__init__.py b/web/pgadmin/tools/restore/__init__.py
index 1e54985..81e480a 100644
--- a/web/pgadmin/tools/restore/__init__.py
+++ b/web/pgadmin/tools/restore/__init__.py
@@ -299,13 +299,13 @@ def create_restore_job(sid):
if data['format'] == 'directory':
args.extend(['--format=d'])
- set_value('pre_data', '--section=pre-data', False)
- set_value('data', '--section=data', False)
- set_value('post_data', '--section=post-data', False)
+ set_param('pre_data', '--section=pre-data')
+ set_param('data', '--section=data')
+ set_param('post_data', '--section=post-data')
if not set_param('only_data', '--data-only'):
set_param('dns_owner', '--no-owner')
- set_param('dns_privilege ', '--no-privileges')
+ set_param('dns_privilege', '--no-privileges')
set_param('dns_tablespace', '--no-tablespaces')
if not set_param('only_schema', '--schema-only'):
@@ -314,8 +314,8 @@ def create_restore_job(sid):
set_param('include_create_database', '--create')
set_param('clean', '--clean')
set_param('single_transaction', '--single-transaction')
- set_param('no_data_fail_table ', '--no-data-for-failed-tables')
- set_param('use_set_session_auth ', '--use-set-session-authorization')
+ set_param('no_data_fail_table', '--no-data-for-failed-tables')
+ set_param('use_set_session_auth', '--use-set-session-authorization')
set_param('exit_on_error', '--exit-on-error')
set_value('no_of_jobs', '--jobs', True)
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 223d516..23a1cf0 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]
)),
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [pgAdmin][Patch]: Fixed RM #3362 - Database restore utility does not honour restore options for sections
2018-07-02 05:09 [pgAdmin][Patch]: Fixed RM #3362 - Database restore utility does not honour restore options for sections Khushboo Vashi <[email protected]>
@ 2018-07-02 14:56 ` Dave Page <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Dave Page @ 2018-07-02 14:56 UTC (permalink / raw)
To: Khushboo Vashi <[email protected]>; +Cc: pgadmin-hackers
Thanks, applied.
On Mon, Jul 2, 2018 at 6:09 AM, Khushboo Vashi <
[email protected]> wrote:
> Hi,
>
> Please find the attached patch to fix RM #3362 : Database restore utility
> does not honour restore options for sections.
>
> Thanks,
> Khushboo
>
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2018-07-02 14:56 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-07-02 05:09 [pgAdmin][Patch]: Fixed RM #3362 - Database restore utility does not honour restore options for sections Khushboo Vashi <[email protected]>
2018-07-02 14:56 ` Dave Page <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox