build: Run mongosh commands within the container.
This is no longer installed by default on ubuntu and so we have to either manually install it or just run the relevant commands in the container here it's already available. This lets us do some of the test setup in a more robust way.
This commit is contained in:
4
.github/workflows/migrations-check.yml
vendored
4
.github/workflows/migrations-check.yml
vendored
@@ -52,7 +52,7 @@ jobs:
|
||||
steps:
|
||||
- name: Setup mongodb user
|
||||
run: |
|
||||
mongosh edxapp --eval '
|
||||
docker exec ${{ job.services.mongo.id }} mongosh edxapp --eval '
|
||||
db.createUser(
|
||||
{
|
||||
user: "edxapp",
|
||||
@@ -67,7 +67,7 @@ jobs:
|
||||
- name: Verify mongo and mysql db credentials
|
||||
run: |
|
||||
mysql -h 127.0.0.1 -uedxapp001 -ppassword -e "select 1;" edxapp
|
||||
mongosh --host 127.0.0.1 --username edxapp --password password --eval 'use edxapp; db.adminCommand("ping");' edxapp
|
||||
docker exec ${{ job.services.mongo.id }} mongosh --host 127.0.0.1 --username edxapp --password password --eval 'use edxapp; db.adminCommand("ping");' edxapp
|
||||
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
Reference in New Issue
Block a user