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-15503. added mongodb atlas 7 to the test.yml #510

Merged
merged 5 commits into from
Mar 18, 2024
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
18 changes: 18 additions & 0 deletions .github/workflows/build-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: "Nightly build"

on:
workflow_dispatch:
schedule:
- cron: '0 7 * * 1-5'

Expand All @@ -11,3 +12,20 @@ jobs:
with:
nightly: true
secrets: inherit

mongo-atlas-tests:
name: MongoDB Atlas 7 Test
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Harness Foundational Test Suite Run on Atlas 7
run: mvn -Dtest="HarnessNoSqlCompatibility" -DconfigFile=/harness-config-cloud.yml -DdbName=mongodb -DdbUsername=${{secrets.TH_DB_ADMIN}} -DdbPassword=${{secrets.TH_DB_PASSWD}} -DdbUrl='${{secrets.TH_MONGO_ATLAS_URL}}' clean package

- name: Archive Mongo Atlas Test Results
uses: actions/upload-artifact@v4
with:
name: mongodb-test-results
path: build/spock-reports
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ jobs:
docker-compose -f ./src/test/resources/docker/docker-compose.yml up -d
docker ps -a

- name: Harness Foundational Test Suite Run - Java ${{ matrix.java }}
- name: Harness Foundational Test Suite Run on Docker - Java ${{ matrix.java }}
run: mvn -Dtest="HarnessNoSqlCompatibility" -DdbName=mongodb clean package

- name: Stop Docker Databases
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ class HarnessNoSqlCompatibility extends Specification {
@Shared
List<DatabaseUnderTest> databases

@Shared
Map<String, Object> argsMap = new HashMap()

def setupSpec() {
databases = TestConfig.instance.getFilteredDatabasesUnderTest()
strategy = MongoTestUtils.chooseRollbackStrategy()
Expand All @@ -34,7 +37,6 @@ class HarnessNoSqlCompatibility extends Specification {
given: "read input data"
String expectedResultSet = getJSONFileContent(testInput.change, testInput.databaseName, testInput.version,
"liquibase/harness/compatibility/foundational/expectedResultSet/" + testInput.inputFormat + "_changelog")
Map<String, Object> argsMap = new HashMap()
argsMap.put("url", testInput.url)
argsMap.put("username", testInput.username)
argsMap.put("password", testInput.password)
Expand Down Expand Up @@ -100,5 +102,6 @@ class HarnessNoSqlCompatibility extends Specification {

def cleanupSpec() {
strategy.cleanupDatabase(databases)
MongoTestUtils.executeCommandScope("dropAll", argsMap)
}
}
9 changes: 9 additions & 0 deletions src/test/resources/harness-config-cloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
inputFormat: xml
context: testContext

databasesUnderTest:
- name: mongodb
version: atlas
url: DBENDPOINT
username: USERNAME
password: PASSWORD
Loading