Skip to content

Commit

Permalink
Fix test make target and import paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuntao Lu committed Jul 13, 2020
1 parent 9668b8e commit ab48f8a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ test-only:
@PATH=$(PATH):$(GOIMPORTS) ZANZIBAR_CACHE=1 go test -race ./codegen/... ./runtime/... | grep -v '\[no test files\]'
@PATH=$(PATH):$(GOIMPORTS) ZANZIBAR_CACHE=1 go test -race $$(go list ./examples/example-gateway/... | grep -v build) | \
grep -v '\[no test files\]'
@PATH=$(PATH):$(GOIMPORTS) ZANZIBAR_CACHE=1 go test ./test/... ./examples/example-gateway/build/... | \
@PATH=$(PATH):$(GOIMPORTS) ZANZIBAR_CACHE=1 go test -race $$(go list ./examples/selective-gateway/... | grep -v build) | \
grep -v '\[no test files\]'
@PATH=$(PATH):$(GOIMPORTS) ZANZIBAR_CACHE=1 go test ./test/... ./examples/example-gateway/build/... ./examples/selective-gateway/build/... | \
grep -v '\[no test files\]'
@rm -f ./test/.cached_binary_test_info.json
@echo "<coverage />" > ./coverage/cobertura-coverage.xml
Expand Down
2 changes: 1 addition & 1 deletion codegen/runner/pre-steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ $(find "${target_dirs[@]}" -name "*.go" | \
)
"$EASY_JSON_BINARY" -all -- "${thriftrw_gofiles[@]}"

goimports -w "$BUILD_DIR/gen-code/"
goimports -w "$ABS_GENCODE_DIR" "$ABS_PROTO_GENCODE_DIR"

end=$(date +%s)
runtime=$((end - start))
Expand Down
4 changes: 2 additions & 2 deletions examples/selective-gateway/endpoints/bounce/bounce.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import (
mirrorclient "github.com/uber/zanzibar/examples/selective-gateway/build/clients/mirror"
"github.com/uber/zanzibar/examples/selective-gateway/build/endpoints/bounce/module"
"github.com/uber/zanzibar/examples/selective-gateway/build/endpoints/bounce/workflow"
"github.com/uber/zanzibar/examples/selective-gateway/build/gen-code/clients/echo"
"github.com/uber/zanzibar/examples/selective-gateway/build/gen-code/clients/mirror"
"github.com/uber/zanzibar/examples/selective-gateway/build/gen-code/endpoints/bounce/bounce"
"github.com/uber/zanzibar/examples/selective-gateway/build/proto-gen/clients/echo"
"github.com/uber/zanzibar/examples/selective-gateway/build/proto-gen/clients/mirror"
zanzibar "github.com/uber/zanzibar/runtime"
)

Expand Down
4 changes: 2 additions & 2 deletions examples/selective-gateway/endpoints/bounce/bounce_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/uber/zanzibar/examples/selective-gateway/build/gen-code/clients/echo"
"github.com/uber/zanzibar/examples/selective-gateway/build/gen-code/clients/mirror"
"github.com/uber/zanzibar/examples/selective-gateway/build/gen-code/endpoints/bounce/bounce"
"github.com/uber/zanzibar/examples/selective-gateway/build/proto-gen/clients/echo"
"github.com/uber/zanzibar/examples/selective-gateway/build/proto-gen/clients/mirror"
)

func TestEcho(t *testing.T) {
Expand Down

0 comments on commit ab48f8a

Please sign in to comment.