diff --git a/Makefile b/Makefile index 5f5c26f5f..9f02a1e1b 100644 --- a/Makefile +++ b/Makefile @@ -53,31 +53,33 @@ test: test-race: CGO_ENABLED=1 $(GO) test ./... -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) -race -timeout $(RACE_TEST_TIMEOUT) -v -testv: topt testvsub +testv: testvsub -testv-race: topt-race testvsub-race +testv-race: testvsub-race # testvsub: run go test -v in sub-directories in "local mode" with incremental output, # avoiding go -test ./... "package list mode" which doesn't give output # until the test run finishes. Package list mode makes it hard to # find which test is hung/deadlocked. # +GOPACKAGES := $(shell $(GO) list ./...) testvsub: - set -e; for i in boltdb client ctl http pg pql rbf roaring server sql txkey; do \ - echo; echo "___ testing subpkg $$i"; \ - cd $$i; pwd; \ - $(GO) test -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) -v -timeout $(RACE_TEST_TIMEOUT) || break; \ - echo; echo "999 done testing subpkg $$i"; \ - cd ..; \ - done + @set -e; for pkg in $(GOPACKAGES); do \ + if [ $${pkg:0:38} == "github.com/molecula/featurebase/v3/idk" ]; then \ + echo; echo "___ skipping subpkg $$pkg"; \ + continue; \ + fi; \ + echo; echo "___ testing subpkg $$pkg"; \ + $(GO) test -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) -v -timeout $(RACE_TEST_TIMEOUT) $$pkg || break; \ + echo; echo "999 done testing subpkg $$pkg"; \ + done + testvsub-race: - set -e; for i in boltdb client ctl http pg pql rbf roaring server sql txkey; do \ - echo; echo "___ testing subpkg $$i -race"; \ - cd $$i; pwd; \ - CGO_ENABLED=1 $(GO) test -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) -v -race -timeout $(RACE_TEST_TIMEOUT) || break; \ - echo; echo "999 done testing subpkg $$i -race"; \ - cd ..; \ + @set -e; for pkg in $(GOPACKAGES); do \ + echo; echo "___ testing subpkg $$pkg"; \ + CGO_ENABLED=1 $(GO) test -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) -v -race -timeout $(RACE_TEST_TIMEOUT) $$pkg || break; \ + echo; echo "999 done testing subpkg $$pkg"; \ done bench: diff --git a/idk/Dockerfile-fakeIDP b/idk/Dockerfile-fakeIDP index a6f3729a7..80523d27e 100644 --- a/idk/Dockerfile-fakeIDP +++ b/idk/Dockerfile-fakeIDP @@ -4,4 +4,4 @@ WORKDIR / COPY fakeidp ./ RUN go build . -ENTRYPOINT ["/fakeidp"] +ENTRYPOINT ["/fakeidpidk"] diff --git a/idk/README.md b/idk/README.md index 2cf566851..cb406966a 100644 --- a/idk/README.md +++ b/idk/README.md @@ -12,7 +12,7 @@ In addition to these dependancies, you will need to be added to the moleculacorp First start the test environment. This is a docker-compose environment that includes pilosa and a confluent kafka stack. Run the following to start those services: - make startup + BRANCH_NAME=master make startup To build and run the integration tests, run: @@ -24,7 +24,7 @@ Then to shut down the test environment, run: You can run all of the previous commands by calling test-all: - make test-all + BRANCH_NAME=master make test-all The previous command is equivalent to running the following: diff --git a/idk/fakeidp/go.mod b/idk/fakeidp/go.mod index 7d0a51cee..3a799c638 100644 --- a/idk/fakeidp/go.mod +++ b/idk/fakeidp/go.mod @@ -1,4 +1,4 @@ -module fakeidp +module fakeidpidk go 1.17 diff --git a/internal/clustertests/Dockerfile-fakeIDP b/internal/clustertests/Dockerfile-fakeIDP index b46556b80..9c2f54cb5 100644 --- a/internal/clustertests/Dockerfile-fakeIDP +++ b/internal/clustertests/Dockerfile-fakeIDP @@ -4,4 +4,4 @@ WORKDIR / COPY fakeidp ./ RUN go build . -ENTRYPOINT ["/fakeidp"] +ENTRYPOINT ["/fakeidpclustertests"] diff --git a/internal/clustertests/fakeidp/go.mod b/internal/clustertests/fakeidp/go.mod index 7d0a51cee..6a73ecb4d 100644 --- a/internal/clustertests/fakeidp/go.mod +++ b/internal/clustertests/fakeidp/go.mod @@ -1,4 +1,4 @@ -module fakeidp +module fakeidpclustertests go 1.17