Skip to content
Permalink
Browse files

Run mongodb as an external resource for testing

  • Loading branch information
arcrose committed Jan 9, 2020
1 parent 089d415 commit ae70791649c691a6be7b9526175bdc0f069502bd
Showing with 20 additions and 0 deletions.
  1. +1 −0 Makefile
  2. +16 −0 docker/compose/docker-compose-tests.yml
  3. +2 −0 tests/config.conf
  4. +1 −0 tests/rest/index.conf
@@ -49,6 +49,7 @@ tests: build-tests run-tests ## Run all tests (getting/building images as neede
run-tests-resources-external: ## Just spin up external resources for tests and have them listen externally
docker-compose -f docker/compose/docker-compose-tests.yml -p test-$(NAME) run -p 9200:9200 -d elasticsearch
docker-compose -f docker/compose/docker-compose-tests.yml -p test-$(NAME) run -p 5672:5672 -d rabbitmq
docker-compose -f docker/compose/docker-compose-tests.yml -p test-$(NAME) run -p 3002:3002 -d mongodb

.PHONY: run-tests-resources
run-tests-resources: ## Just run the external resources required for tests
@@ -19,6 +19,22 @@ services:
# - 9200:9200
networks:
- default
mongodb:
image: mozdef/mozdef_mongodb
build:
context: ../../
dockerfile: docker/compose/mongodb/Dockerfile
cache_from:
- mozdef_mongodb:latest
- mozdef_base:latest
- mozdef/mongodb
- mozdef/mozdef_base
depends_on:
- base
restart: always
command: ["bin/mongod", "--config", "/etc/mongod.conf"]
networks:
- default
rabbitmq:
image: mozdef/mozdef_rabbitmq
build:
@@ -7,3 +7,5 @@ mqalertserver=localhost
mqserver=localhost
alertexchange=alerts
alertqueue=mozdef.alert
mongohost=localhost
mongoport=3002
@@ -1,4 +1,5 @@
[options]
esservers=http://localhost:9200
mongohost=localhost
mongoport=3002
listen_host=0.0.0.0

0 comments on commit ae70791

Please sign in to comment.
You can’t perform that action at this time.