Skip to content

Commit

Permalink
Change admin role name and dataabase name to reflect change in module…
Browse files Browse the repository at this point in the history
… name
  • Loading branch information
marcjohnson-kint committed Aug 15, 2017
1 parent 8bb5110 commit 25867e4
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion DeploymentDescriptor-environment.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"descriptor" : {
"exec" : "java -jar ../mod-inventory-storage/target/mod-inventory-storage-fat.jar -Dhttp.port=%p",
"env": [
{ "name" : "db.username", "value" : "demo_inventory_storage_admin" },
{ "name" : "db.username", "value" : "demo_mod_inventory_storage_admin" },
{ "name" : "db.password", "value" : "admin" },
{ "name" : "db.database", "value" : "demo" }
]
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ external_test_results=$?
env db.host=localhost \
db.port=5432 \
db.database=test \
db.username=inventory_storage_admin \
db.username=mod_inventory_storage_admin \
db.password=admin \
mvn test -Dorg.folio.inventory.storage.test.database=environment

Expand Down
2 changes: 1 addition & 1 deletion demo-postgres-conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"host" : "localhost",
"port" : 5432,
"database" : "demo",
"username" : "demo_inventory_storage_admin",
"username" : "demo_mod_inventory_storage_admin",
"password" : "admin"
}
2 changes: 1 addition & 1 deletion descriptors/DeploymentDescriptor-environment-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"descriptor" : {
"exec" : "java -jar ../mod-inventory-storage/target/inventory-storage-fat.jar -Dhttp.port=%p",
"env": [
{ "name" : "db.username", "value" : "demo_inventory_storage_admin" },
{ "name" : "db.username", "value" : "demo_mod_inventory_storage_admin" },
{ "name" : "db.password", "value" : "admin" },
{ "name" : "db.database", "value" : "demo" }
]
Expand Down
4 changes: 2 additions & 2 deletions destroy-demo-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ executing_password=${5:-}

cd database-setup

./destroy-db.sh demo demo_tenant_inventory_storage demo_inventory_storage_admin ${host} ${port} ${executing_user} ${executing_password}
./destroy-db.sh demo demo_tenant_mod_inventory_storage demo_mod_inventory_storage_admin ${host} ${port} ${executing_user} ${executing_password}

# Drop the tenant based role as well, because deactivation no longer calls the Tenant API
./drop-role.sh demo_tenant_inventory_storage
./drop-role.sh demo_tenant_mod_inventory_storage

cd ..
4 changes: 2 additions & 2 deletions destroy-test-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ executing_password=${5:-}

cd database-setup

./destroy-db.sh test test_tenant_inventory_storage test_inventory_storage_admin ${host} ${port} ${executing_user} ${executing_password}
./destroy-db.sh test test_tenant_mod_inventory_storage test_mod_inventory_storage_admin ${host} ${port} ${executing_user} ${executing_password}

# Drop the tenant based role as well, because deactivation no longer calls the Tenant API
./drop-role.sh test_tenant_inventory_storage
./drop-role.sh test_tenant_mod_inventory_storage

cd ..
2 changes: 1 addition & 1 deletion external-test-postgres-conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"host" : "localhost",
"port" : 5432,
"database" : "test",
"username" : "inventory_storage_admin",
"username" : "mod_inventory_storage_admin",
"password" : "admin"
}
2 changes: 1 addition & 1 deletion setup-demo-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ executing_password=${4:-}

cd database-setup

./setup-db.sh demo demo_tenant_inventory_storage demo_inventory_storage_admin ${host} ${port} ${executing_user} ${executing_password}
./setup-db.sh demo demo_tenant_mod_inventory_storage demo_mod_inventory_storage_admin ${host} ${port} ${executing_user} ${executing_password}

cd ..
2 changes: 1 addition & 1 deletion setup-test-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ executing_password=${4:-}

cd database-setup

./setup-db.sh test test_tenant_inventory_storage inventory_storage_admin ${host} ${port} ${executing_user} ${executing_password}
./setup-db.sh test test_tenant_mod_inventory_storage mod_inventory_storage_admin ${host} ${port} ${executing_user} ${executing_password}

cd ..
2 changes: 1 addition & 1 deletion src/main/java/org/folio/rest/impl/InstanceStorageAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public void deleteInstanceStorageInstances(
vertxContext.owner(), TenantTool.calculateTenantId(tenantId));

postgresClient.mutate(String.format("TRUNCATE TABLE %s_%s.instance",
tenantId, "inventory_storage"),
tenantId, "mod_inventory_storage"),
reply -> {
asyncResultHandler.handle(io.vertx.core.Future.succeededFuture(
InstanceStorageResource.DeleteInstanceStorageInstancesResponse
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/folio/rest/impl/ItemStorageAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public void deleteItemStorageItems(
vertxContext.owner(), TenantTool.calculateTenantId(tenantId));

postgresClient.mutate(String.format("TRUNCATE TABLE %s_%s.item",
tenantId, "inventory_storage"),
tenantId, "mod_inventory_storage"),
reply -> {
if (reply.succeeded()) {
asyncResultHandler.handle(Future.succeededFuture(
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/folio/rest/impl/LoanTypeAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ public void deleteLoanTypes(String lang, Map<String, String> okapiHeaders,
vertxContext.owner(), TenantTool.calculateTenantId(tenantId));

postgresClient.mutate(String.format("DELETE FROM %s_%s.%s",
tenantId, "inventory_storage", LOAN_TYPE_TABLE),
tenantId, "mod_inventory_storage", LOAN_TYPE_TABLE),
reply -> {
if (reply.succeeded()) {
asyncResultHandler.handle(Future.succeededFuture(
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/folio/rest/impl/MaterialTypeAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public void deleteMaterialTypes(String lang, Map<String, String> okapiHeaders,
vertxContext.owner(), TenantTool.calculateTenantId(tenantId));

postgresClient.mutate(String.format("DELETE FROM %s_%s.%s",
tenantId, "inventory_storage", MATERIAL_TYPE_TABLE),
tenantId, "mod_inventory_storage", MATERIAL_TYPE_TABLE),
reply -> {
if (reply.succeeded()) {
asyncResultHandler.handle(Future.succeededFuture(
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/folio/rest/api/StorageTestSuite.java
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ private static ResultSet getRecordsWithUnmatchedIds(String tenantId,

String sql = String.format("SELECT null FROM %s_%s.%s" +
" WHERE CAST(_id AS VARCHAR(50)) != jsonb->>'id'",
tenantId, "inventory_storage", tableName);
tenantId, "mod_inventory_storage", tableName);

dbClient.select(sql, result -> {
if(result.succeeded()) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/postgres-conf-ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"host" : "localhost",
"port" : 5433,
"database" : "test",
"username" : "inventory_storage_admin",
"username" : "mod_inventory_storage_admin",
"password" : "admin"
}
2 changes: 1 addition & 1 deletion src/test/resources/postgres-conf-local.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"host" : "localhost",
"port" : 5432,
"database" : "test",
"username" : "inventory_storage_admin",
"username" : "mod_inventory_storage_admin",
"password" : "admin"
}

0 comments on commit 25867e4

Please sign in to comment.