Skip to content

Commit

Permalink
added --no-privileges to pg_restore
Browse files Browse the repository at this point in the history
  • Loading branch information
csrster committed Feb 6, 2018
1 parent 3e4d62f commit 0ce2098
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -171,19 +171,19 @@ protected void replaceDatabasesWithProd(boolean nodata) throws Exception {
addFixture("Restoring harvestdb schema");
String createRelationsHarvestDB =
"pg_restore -U " + TestEnvironment.DEPLOYMENT_USER
+ " -d stresstest_harvestdb --no-owner -s --schema public /tmp/" + backupEnv
+ " -d stresstest_harvestdb --no-privileges --no-owner -s --schema public /tmp/" + backupEnv
+ "_harvestdb.dump.out" + compressionSuffix;
String populateSchemaVersionsHarvestDB =
"pg_restore -U " + TestEnvironment.DEPLOYMENT_USER
+ " -d stresstest_harvestdb --no-owner -t schemaversions --clean --schema public /tmp/"
+ " -d stresstest_harvestdb --no-privileges --no-owner -t schemaversions --clean --schema public /tmp/"
+ backupEnv + "_harvestdb.dump.out" + compressionSuffix;
String populateOrdertemplatesHarvestDB =
"pg_restore -U " + TestEnvironment.DEPLOYMENT_USER
+ " -d stresstest_harvestdb --no-owner -t ordertemplates --clean --schema public /tmp/"
+ " -d stresstest_harvestdb --no-privileges --no-owner -t ordertemplates --clean --schema public /tmp/"
+ backupEnv + "_harvestdb.dump.out" + compressionSuffix;
String populateSchedulesDB =
"pg_restore -U " + TestEnvironment.DEPLOYMENT_USER
+ " -d stresstest_harvestdb --no-owner -t schedules --clean --schema public /tmp/"
+ " -d stresstest_harvestdb --no-privileges --no-owner -t schedules --clean --schema public /tmp/"
+ backupEnv + "_harvestdb.dump.out" + compressionSuffix;
testController.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER, createRelationsHarvestDB);
testController.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER, populateSchemaVersionsHarvestDB);
Expand All @@ -201,7 +201,7 @@ protected void replaceDatabasesWithProd(boolean nodata) throws Exception {
addFixture("Ingesting full production harvestdb backup");
testController.runTestXCommand(TestEnvironment.JOB_ADMIN_SERVER,
"pg_restore -U " + TestEnvironment.DEPLOYMENT_USER + " -d " + ENV.getTESTX().toLowerCase()
+ "_harvestdb --no-owner --schema public /tmp/" + backupEnv + "_harvestdb.dump.out" + compressionSuffix);
+ "_harvestdb --no-owner --no-privileges --schema public /tmp/" + backupEnv + "_harvestdb.dump.out" + compressionSuffix);

addFixture("Replacing checksum database with prod data");
testController.runTestXCommand(TestEnvironment.CHECKSUM_SERVER, "rm -rf CS");
Expand Down

0 comments on commit 0ce2098

Please sign in to comment.