note := -note "Code generated - this lets golint know to skip this file - DO NOT EDIT."
mockery := mockery $(note) -all
aws-mock := $(mockery) -output internal/mocks -dir vendor/github.com/aws/aws-sdk-go/service

.PHONY: mocks
mocks:
	$(mockery) -dir queue -output queue/mocks -outpkg mocks
	$(aws-mock)/lambda/lambdaiface
	$(mockery) -dir inventory/heartbeat/heartbeatiface -output inventory/heartbeat/heartbeatmocks -outpkg heartbeatmocks
	$(mockery) -dir internal/envelope/envelopeiface -all -output internal/envelope/envelopemocks -outpkg envelopemocks
test-integration-localstack:
	INTEGRATION_STACK_TYPE="LocalStack" \
		INTEGRATION_LOCAL_STACK_ACCOUNT_NUMBER="505345203727" \
		INTEGRATION_LOCAL_STACK_AWS_REGION="us-west-2" \
		INTEGRATION_LOCAL_STACK_STACK_NAME="sandstorm-testing" \
		go test -race -tags integration $$(go list ./... | grep -v '/cmd/')
