Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAT-13214. added authentification for HarnessNoSqlCompatibility test #335

Merged
merged 6 commits into from
Feb 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,6 @@ jobs:
strategy:
matrix:
java: [ 11, 17 ]
mongodb: [ 4 ]
services:
mongodb:
image: mongo:${{ matrix.mongodb }}
env:
MONGO_INITDB_DATABASE: lbcat
ports:
- 27020:27017

steps:
- uses: actions/checkout@v2
Expand All @@ -96,9 +88,18 @@ jobs:
**/target/**
~/.m2/repository/org/liquibase/

- name: Start Database
run: |
docker ps -a
docker-compose -f ./src/test/resources/docker/docker-compose.yml up -d
docker ps -a

- name: Harness Foundational Test Suite Run - Java ${{ matrix.java }}
run: mvn -Dtest="HarnessNoSqlCompatibility" -DdbName=mongodb -DdbUrl=mongodb://localhost:27020/lbcat clean package
run: mvn -Dtest="HarnessNoSqlCompatibility" -DdbName=mongodb clean package

- name: Stop Docker Databases
if: always()
run: docker-compose -f ./src/test/resources/docker/docker-compose.yml down

- name: Archive Mongo Database Test Results
uses: actions/upload-artifact@v3
Expand Down
12 changes: 12 additions & 0 deletions src/test/resources/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3.1'

services:

mongo:
image: mongo:latest
ports:
- "27020:27017"
environment:
MONGO_INITDB_DATABASE: lbcat
volumes:
- ./init-mongo.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
12 changes: 12 additions & 0 deletions src/test/resources/docker/init-mongo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
db.createUser(
{
user: "lbuser",
pwd: "LiquibasePass1",
roles: [
{
role: "readWrite",
db: "lbcat"
}
]
}
);
6 changes: 3 additions & 3 deletions src/test/resources/harness-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ context: testContext
databasesUnderTest:
- name: mongodb
version:
url: mongodb://localhost:27017/lbcat
username:
password:
url: mongodb://localhost:27020/lbcat
username: lbuser
password: LiquibasePass1