Skip to content

Commit 84a9c3c

Browse files
committed
Install Mongodb Shell and check connection using mongodb shell
## Summary - Install Mongodb Shell instead of C# MongoDB driver - Check connection to Mongodb using mongodb shell ## Details - Replaced the step "Install C# MongoDB driver" with "Install Mongodb Shell" by running `choco install mongodb-shell -y` - Updated the step "Check connection to Mongodb" to use mongodb shell by running `mongosh --eval "db.adminCommand('listDatabases')"` - No changes made to the step "Use Node.js ${{ matrix.node-version }}"
1 parent 247f9af commit 84a9c3c

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

.github/workflows/test-windows.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,14 @@ jobs:
3636
}
3737
shell: pwsh
3838

39-
- name: Install C# MongoDB driver
39+
- name: Install Mongodb Shell
4040
run: |
41-
dotnet add package MongoDB.Driver --version 2.21.0
41+
choco install mongodb-shell -y
4242
shell: pwsh
4343

44-
- name: Check connection to Mongodb
44+
- name: Check connection to Mongodb using mongodb shell
4545
run: |
46-
$connectionString = "mongodb://$env:WATERLINE_ADAPTER_TESTS_HOST:$env:WATERLINE_ADAPTER_TESTS_PORT/$env:WATERLINE_ADAPTER_TESTS_DATABASE"
47-
$connection = New-Object MongoDB.Driver.MongoClient($connectionString)
48-
$connection.ListDatabaseNames()
49-
shell: pwsh
46+
mongosh --eval "db.adminCommand('listDatabases')"
5047
5148
- name: Use Node.js ${{ matrix.node-version }}
5249
uses: actions/setup-node@v3

0 commit comments

Comments
 (0)