I am trying to run integration tests in CircleCI on code that makes use of MongoDB Transactions. I am currently getting the following error:
(IllegalOperation) Transaction numbers are only allowed on a replica set member or mongos
Is there a way to initiate a replicaset before running the tests?
I have tried using docker exec to run commands on the container without any success.
Has anyone managed to do this before?
Currently my circleci config file looks like this:
integration:
docker:
- image: circleci/golang:1.13
- image: circleci/mongo:3
steps:
- attach_workspace:
at: .
- run: go test ./... -mod vendor -v -race -tags integration