diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 557eb80834b3822dae1ebe46060c99596d3064e9..b103c83586fe2f1160340af728bb6d5c59765da7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,7 +28,7 @@ run_test: stage: test script: - yarn install --frozen-lockfile --silent --non-interactive - - mv config/ci_database_test.env.example config/test.env + - mv config/test.env.example config/test.env - yarn test - yarn run lint tags: @@ -59,4 +59,3 @@ deploy: - build only: - develop - diff --git a/config/config.env.example b/config/config.env.example index 5d330011e1086b376ce148b64c0f78b1231885b2..415c3b6d055dd1fecf2b627872bf7690997797f9 100644 --- a/config/config.env.example +++ b/config/config.env.example @@ -1,8 +1,9 @@ -BLENDB_DB_NAME=blendb-test -BLENDB_DB_USER=blendb -BLENDB_DB_PASSWORD=secret -BLENDB_DB_HOST=localhost -BLENDB_DB_PORT=5432 -BLENDB_ADAPTER=postgres BLENDB_SCHEMA_FILE=config/config.yaml.example PORT=3000 +BLENDB_N_DB=1 +BLENDB_DB0_USER=blendb +BLENDB_DB0_NAME=blendb-test +BLENDB_DB0_PASSWORD=secret +BLENDB_DB0_HOST=localhost +BLENDB_DB0_PORT=5432 +BLENDB_DB0_ADAPTER=postgres diff --git a/config/ci_database_test.env.example b/config/test.env.example similarity index 100% rename from config/ci_database_test.env.example rename to config/test.env.example diff --git a/config/test/postgres/fixtures/sellerstatus.json b/config/test/postgres/fixtures/sellerstatus.json deleted file mode 100644 index c9d05e0acd2ccd3cdd3913dd8f4e05a21894d4bc..0000000000000000000000000000000000000000 --- a/config/test/postgres/fixtures/sellerstatus.json +++ /dev/null @@ -1,4 +0,0 @@ -[ - {"met:seller:count:age" : 4, "dim:seller:status" : "active"}, - {"met:seller:count:age" : 1, "dim:seller:status" : "sick leave"} -] diff --git a/docker-compose.yml b/docker-compose.yml index 2bc93dd4ca232d0b1b01bf943b804f552b089916..cee9167ead44039aceffe6c4ac0c4d5879cd3cde 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,18 +12,20 @@ services: security_opt: - no-new-privileges blendb: - image: marula.c3sl.ufpr.br:5000/c3sl/blendb:latest + # image: marula.c3sl.ufpr.br:5000/c3sl/blendb:latest + image: blendb build: . container_name: blendb environment: - BLENDB_DB_USER: postgres - BLENDB_DB_PASSWORD: passwd - BLENDB_DB_NAME: postgres - BLENDB_DB_HOST: postgres - BLENDB_DB_PORT: 5432 - BLENDB_ADAPTER: postgres BLENDB_SCHEMA_FILE: config/config.yaml.example PORT: 3000 + BLENDB_N_DB: 1 + BLENDB_DB0_USER: postgres + BLENDB_DB0_NAME: postgres + BLENDB_DB0_PASSWORD: passwd + BLENDB_DB0_HOST: postgres + BLENDB_DB0_PORT: 5432 + BLENDB_DB0_ADAPTER: postgres ports: - 3000:3000 command: ["yarn","test-mode"] diff --git a/scripts/loadTest.ts b/scripts/loadTest.ts index 4e8fe824f877ea12c74a6b6fde72225e8d3aa771..e0c53a684ee43dedc5e72f3a0ca84846ae4b856d 100644 --- a/scripts/loadTest.ts +++ b/scripts/loadTest.ts @@ -37,7 +37,7 @@ else{ } config = ConfigParser.parse(configPath); -fixture = new FixPostgres(config.connection); +fixture = new FixPostgres(config.connections[0]); fixture.load(config.loadViews, (err) => { if (err) { diff --git a/scripts/schema.ts b/scripts/schema.ts index c8a8d39e313e21ca36080e75a593b33b26787789..baef54d368f50b9234dc3384ef78957d3c073031 100755 --- a/scripts/schema.ts +++ b/scripts/schema.ts @@ -40,7 +40,7 @@ const config = ConfigParser.parse(configFile); const referencePath = path.dirname(configFile); const engine = new Engine(config); -const adapter = new PostgresAdapter(config.connection); +const adapter = new PostgresAdapter(config.connections[0]); let schema = "";