Skip to content

Commit

Permalink
Merge pull request #83 from tokopedia/issue_65
Browse files Browse the repository at this point in the history
making go_package required
  • Loading branch information
jekiapp committed Aug 3, 2021
2 parents 283a8f7 + ebbbd6e commit d2a71b0
Show file tree
Hide file tree
Showing 39 changed files with 1,364 additions and 565 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
go.sum
pkged.go
gripmock
.idea
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ WORKDIR /go/src/github.com/tokopedia/gripmock
# install gripmock
RUN go install -v

# remove all .pb.go generated files
# since generating go file is part of the test
RUN find . -name "*.pb.go" -delete -type f

EXPOSE 4770 4771

ENTRYPOINT ["gripmock"]
1 change: 1 addition & 0 deletions example/multi-files/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"google.golang.org/grpc"
)

//go:generate protoc --go_out=plugins=grpc:${GOPATH}/src -I=.. ../file1.proto ../file2.proto
func main() {
ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
defer cancel()
Expand Down
6 changes: 5 additions & 1 deletion example/multi-files/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

# this file is used by .github/workflows/integration-test.yml

gripmock --stub=example/multi-files/stub example/multi-files/file1.proto example/multi-files/file2.proto &
gripmock --stub=example/multi-files/stub example/multi-files/file1.proto \
example/multi-files/file2.proto &

# wait for generated files to be available and gripmock is up
sleep 2

go run example/multi-files/client/*.go
Loading

0 comments on commit d2a71b0

Please sign in to comment.