From c556845d1a41bfdccc9862de82b07024f1ad0cf0 Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Tue, 31 May 2022 10:15:04 -0400 Subject: [PATCH] Update unit test download package --- .github/workflows/tests.yaml | 3 +-- Makefile | 16 ++++++---------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 2bf9220b..2306898b 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -52,8 +52,7 @@ jobs: - name: Trigger Unit Test run: | - ssh -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }} go install github.com/onsi/ginkgo/v2/ginkgo@latest - ssh -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }} chmod +x /tmp/run_unit_test.sh /tmp/run_unit_test.sh + ssh -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }} go install github.com/onsi/ginkgo/ginkgo@latest ssh -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }} /tmp/run_unit_test.sh - name: Get the logs and cat them diff --git a/Makefile b/Makefile index d99a52fc..a45346a4 100644 --- a/Makefile +++ b/Makefile @@ -3,10 +3,6 @@ BASE = $(GOPATH)/src/$(PACKAGE) PKGS = go list ./... | grep -v "^vendor/" # Tools -## Testing library -GINKGO = $(BIN)/ginkgo -$(BIN)/ginkgo: - go run github.com/onsi/ginkgo/ginkgo ## Migration tool GOOSE = $(BIN)/goose @@ -26,7 +22,7 @@ $(BIN)/gometalinter.v2: .PHONY: installtools -installtools: | $(LINT) $(GOOSE) $(GINKGO) +installtools: | $(LINT) $(GOOSE) echo "Installing tools" go mod download @@ -55,19 +51,19 @@ TEST_CONNECT_STRING = postgresql://$(DATABASE_USER):$(DATABASE_PASSWORD)@$(DATAB TEST_CONNECT_STRING_LOCAL = postgresql://$(USER)@$(HOST_NAME):$(PORT)/$(TEST_DB)?sslmode=disable .PHONY: test -test: | $(GINKGO) $(GOOSE) +test: | $(GOOSE) go vet ./... go fmt ./... - $(GINKGO) -r --skipPackage=test + go run github.com/onsi/ginkgo/ginkgo -r --skipPackage=test .PHONY: integrationtest -integrationtest: | $(GINKGO) $(GOOSE) +integrationtest: | $(GOOSE) go vet ./... go fmt ./... - $(GINKGO) -r test/ -v + go run github.com/onsi/ginkgo/ginkgo -r test/ -v .PHONY: test_local -test_local: | $(GINKGO) $(GOOSE) +test_local: | $(GOOSE) go vet ./... go fmt ./... ./scripts/run_unit_test.sh