I'm trying to use commands such as mongoimport, mongodump and mongorestore to prepare my testing db before running my tests but I'm getting the error "bash: mongoimport: command not found"
My bitbucket-pipelines.yml file looks something like:
image: node:8
pipelines:
branches:
Development:
- step:
name: Test
caches:
- node
services:
- mongo
script:
- mongoimport --uri "testDB" --drop --collection users --file ./seed/users.json
- mongodump --uri "otherDB" --out "/backups"
- mongorestore --uri "testDB" --db testDB "/backups/otherDB"
- npm install
- npm test
definitions:
services:
mongo:
image: mongo
I'm not sure why I don't have access to the mongodb commands, I thought having the service running would allow me to easily perform a dump and restore.