popen() function strips the quotes from the arguments, so backup fails

for the schema name that needs quoting.

Code is changed to add escapers.

Fixes #4590
This commit is contained in:
Aditya Toshniwal
2019-10-10 17:58:32 +05:30
committed by Akshay Joshi
parent f16498a8a7
commit d056a94f0c
5 changed files with 55 additions and 12 deletions

View File

@@ -36,13 +36,13 @@ class ImportExportServersTestCase(BaseTestGenerator):
# Load the servers
os.system(
"python %s --load-servers %s 2> %s" %
"python \"%s\" --load-servers \"%s\" 2> %s" %
(setup, os.path.join(path, "servers.json"), os.devnull)
)
# And dump them again
tf = tempfile.NamedTemporaryFile(delete=False)
os.system("python %s --dump-servers %s 2> %s" %
os.system("python \"%s\" --dump-servers \"%s\" 2> %s" %
(setup, tf.name, os.devnull))
# Compare the JSON files, ignoring servers that exist in our