i want integration test for my golang project, and using mongodb transaction. to make it work
i need make mongodb services running replica set
this my .gitlab-ci.yml
image: golang:1.13
services:
- name: mongo:4.2
alias: mongo-svc
command: ["mongod", "--logpath=/dev/null", "--bind_ip_all", "--replSet=rs0"]
unit_tests:
stage: test
script:
- mongo-svc exec mongo --eval "rs.initiate()"
- make test
i get error
$ mongo-svc mongo --eval "rs.initiate()"
/bin/bash: line 95: mongo-svc: command not found
ERROR: Job failed: exit code 1
i already use another command but still cant find how to do it.
Please help me, stuck 5 hours only for this…