diff --git a/Makefile b/Makefile index 455dd63..1a8b5c8 100644 --- a/Makefile +++ b/Makefile @@ -2,10 +2,17 @@ build: docker compose build init: - docker network create datalake-taxii || echo "Using previously created network datalake-taxii..." && docker compose run --rm --entrypoint "python main.py --init" taxii_integration && docker compose restart medallion + docker network create datalake-taxii || echo "Using previously created network datalake-taxii..." \ + && docker compose run --rm --entrypoint "python main.py --init" taxii_integration \ + && docker compose restart medallion run: docker compose run --rm taxii_integration test: - docker network create datalake-taxii || echo "Using previously created network datalake-taxii..." && docker compose -f docker-compose.test.yml up -d -V nginx_proxy && docker compose -f docker-compose.test.yml run --entrypoint "python main.py --init" taxii_integration && docker compose -f docker-compose.test.yml restart medallion && docker compose -f docker-compose.test.yml run --entrypoint=sh taxii_integration -c "python -m flake8 . --count --max-complexity=10 --max-line-length=120 --show-source --statistics && python -m pytest -s " \ No newline at end of file + docker network create test-datalake-taxii || echo "Using previously created network test-datalake-taxii..." \ + && docker compose -f docker-compose.test.yml up -d -V nginx_proxy \ + && docker compose -f docker-compose.test.yml run --entrypoint "python main.py --init" taxii_integration \ + && docker compose -f docker-compose.test.yml restart medallion \ + && docker compose -f docker-compose.test.yml run --entrypoint=sh taxii_integration -c \ + "python -m flake8 . --count --max-complexity=10 --max-line-length=120 --show-source --statistics && python -m pytest -s " diff --git a/docker-compose.test.yml b/docker-compose.test.yml index c5adce5..4dfe538 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -10,7 +10,7 @@ services: depends_on: - medallion networks: - - datalake-taxii + - test-datalake-taxii nginx_proxy: image: nginx @@ -25,7 +25,7 @@ services: depends_on: - nginx networks: - datalake-taxii: + test-datalake-taxii: aliases: - my.taxii_server.com @@ -40,7 +40,7 @@ services: depends_on: - nginx_proxy networks: - - datalake-taxii + - test-datalake-taxii medallion: image: ocddev/cti-taxii-server @@ -53,7 +53,7 @@ services: depends_on: - mongo networks: - - datalake-taxii + - test-datalake-taxii mongo: image: mongo @@ -67,13 +67,13 @@ services: ports: - 27017:27017 networks: - - datalake-taxii + - test-datalake-taxii volumes: data_volume: networks: - datalake-taxii: + test-datalake-taxii: external: true - name: datalake-taxii + name: test-datalake-taxii