use of org.folio.postgres.testing.PostgresTesterContainer in project raml-module-builder by folio-org.
the class PostgresClientITBase method setUpClass.
protected static void setUpClass(TestContext context) throws Exception {
vertx = VertxUtils.getVertxWithExceptionHandler();
PostgresClient.setPostgresTester(new PostgresTesterContainer());
dropSchemaAndRole(context);
executeSuperuser(context, "CREATE ROLE " + schema + " PASSWORD '" + tenant + "' NOSUPERUSER NOCREATEDB INHERIT LOGIN", "CREATE SCHEMA " + schema + " AUTHORIZATION " + schema, "GRANT ALL PRIVILEGES ON SCHEMA " + schema + " TO " + schema);
LoadGeneralFunctions.loadFuncs(context, PostgresClient.getInstance(vertx), schema);
}
use of org.folio.postgres.testing.PostgresTesterContainer in project raml-module-builder by folio-org.
the class PgUtilIT method setUpClass.
@BeforeClass
public static void setUpClass(TestContext context) throws Exception {
PostgresClient.setPostgresTester(new PostgresTesterContainer());
vertx = VertxUtils.getVertxWithExceptionHandler();
createUserTable(context);
}
use of org.folio.postgres.testing.PostgresTesterContainer in project raml-module-builder by folio-org.
the class ConnIT method setUp.
@BeforeAll
static void setUp(Vertx vertx, VertxTestContext vtc) {
PostgresClient.setPostgresTester(new PostgresTesterContainer());
String sql = "DROP SCHEMA IF EXISTS tenant_raml_module_builder CASCADE;\n" + "DO $$\n" + " BEGIN\n" + " CREATE ROLE tenant_raml_module_builder PASSWORD 'tenant' NOSUPERUSER NOCREATEDB INHERIT LOGIN;\n" + " EXCEPTION WHEN OTHERS THEN NULL;\n" + " END $$;\n" + "CREATE SCHEMA tenant_raml_module_builder AUTHORIZATION tenant_raml_module_builder;\n" + "GRANT ALL PRIVILEGES ON SCHEMA tenant_raml_module_builder TO tenant_raml_module_builder;\n" + "CREATE TABLE tenant_raml_module_builder.t (id UUID PRIMARY KEY , jsonb JSONB NOT NULL);\n" + "GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA tenant_raml_module_builder TO tenant_raml_module_builder;\n";
PostgresClient admin = PostgresClient.getInstance(vertx);
admin.execute(sql).compose(x -> LoadGeneralFunctions.loadFuncs(admin, "tenant_raml_module_builder")).onSuccess(x -> postgresClient = PostgresClient.getInstance(vertx, "tenant")).onComplete(vtc.succeedingThenComplete());
}
use of org.folio.postgres.testing.PostgresTesterContainer in project raml-module-builder by folio-org.
the class PostgresClientIT method doesNotCompleteOnWindows.
@BeforeClass
public static void doesNotCompleteOnWindows() {
final String os = System.getProperty("os.name").toLowerCase();
PostgresClient.setPostgresTester(new PostgresTesterContainer());
// RMB-261
org.junit.Assume.assumeFalse(os.contains("win"));
}
Aggregations