Skip to content

Commit

Permalink
Improve integration test setup
Browse files Browse the repository at this point in the history
Signed-off-by: naveensrinivasan <[email protected]>
  • Loading branch information
naveensrinivasan committed Oct 6, 2023
1 parent 1a5d484 commit 7f047e7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@ test: generate
# To run it locally you can run the following command: make start-integration-service
.PHONY: integration-test
integration-test: generate check-env
go test -tags=integration ./...

# Runs the integration tests locally using docker-compose to start the dependencies and cleans up after itself.
.PHONY: integration-test-local
integration-test-local: generate check-env start-integration-service
sleep 5
ENT_TEST_DATABASE_URL='postgresql://guac:guac@localhost/guac?sslmode=disable' go test -tags=integration ./...
$(CONTAINER) compose down

.PHONY: integration-merge-test
integration-merge-test: generate check-env
Expand Down Expand Up @@ -141,7 +148,7 @@ stop-service:
# This is a helper target to run the integration tests locally.
.PHONY: start-integration-service
start-integration-service: check-docker-compose-tool-check
$(CONTAINER) compose -f integration.docker-compose.yaml up --force-recreate
$(CONTAINER) compose -f integration.docker-compose.yaml up --force-recreate -d

.PHONY: check-docker-tool-check
check-docker-tool-check:
Expand Down

0 comments on commit 7f047e7

Please sign in to comment.