mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-09 14:41:02 +00:00
Distinguish between three copies of fakeidp service (#2192)
There are currently three copies of a package called `fakeidp` in the
featurebase repo:
- ./idk/fakeidp/go.mod
- ./internal/clustertests/fakeidp/go.mod
- ./qa/fakeidp/go.mod
All three have a `go.mod` file. While this is supported under golang's
new Workspace support, what's not supported is that the modules share
the same name (in this case "fakeidp"). This commit is a sort of
temporary fix which renames the module for two of the instances. This
prevents, for example, VSCode with workspace support enabled, from
barfing.
By the way, one can enable VSCode workspace support with the following
setting:
```
// gopls
"gopls": {
"build.experimentalWorkspaceModule": true
}
```
Also...
This commit fixes the `make testv` target. It's probably not used
anywhere (which I'm assuming because it was broken), but it's a handle
target, so now it will list and run tests against all packages found in
the repo, including the root package.
This commit is contained in:
parent
baab212bb1
commit
cddd9871af
6 changed files with 23 additions and 21 deletions
32
Makefile
32
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:
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@ WORKDIR /
|
|||
COPY fakeidp ./
|
||||
RUN go build .
|
||||
|
||||
ENTRYPOINT ["/fakeidp"]
|
||||
ENTRYPOINT ["/fakeidpidk"]
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
module fakeidp
|
||||
module fakeidpidk
|
||||
|
||||
go 1.17
|
||||
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@ WORKDIR /
|
|||
COPY fakeidp ./
|
||||
RUN go build .
|
||||
|
||||
ENTRYPOINT ["/fakeidp"]
|
||||
ENTRYPOINT ["/fakeidpclustertests"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
module fakeidp
|
||||
module fakeidpclustertests
|
||||
|
||||
go 1.17
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue