Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix query params for invoked in-process local request #1212

Merged
merged 3 commits into from
Apr 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions examples/internal/integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1660,13 +1660,19 @@ func testResponseStrings(t *testing.T, port int) {
}

func TestRequestQueryParams(t *testing.T) {
testRequestQueryParams(t, 8088)
}

func TestRequestQueryParamsInProcessGateway(t *testing.T) {
testRequestQueryParams(t, 8089)
}

func testRequestQueryParams(t *testing.T, port int) {
if testing.Short() {
t.Skip()
return
}

port := 8088

formValues := url.Values{}
formValues.Set("string_value", "hello-world")
formValues.Add("repeated_string_value", "demo1")
Expand Down
7 changes: 6 additions & 1 deletion examples/internal/integration/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func waitForGateway(ctx context.Context, port uint16) error {
}

func runServers(ctx context.Context) <-chan error {
ch := make(chan error, 2)
ch := make(chan error, 3)
go func() {
if err := server.Run(ctx, *network, *endpoint); err != nil {
ch <- fmt.Errorf("cannot run grpc service: %v", err)
Expand All @@ -68,6 +68,11 @@ func runServers(ctx context.Context) <-chan error {
ch <- fmt.Errorf("cannot run gateway service: %v", err)
}
}()
go func() {
if err := server.RunInProcessGateway(ctx, ":8089"); err != nil {
ch <- fmt.Errorf("cannot run in process gateway service: %v", err)
}
}()
return ch
}

Expand Down
40 changes: 32 additions & 8 deletions examples/internal/proto/examplepb/a_bit_of_everything.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 24 additions & 6 deletions examples/internal/proto/examplepb/echo_service.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 32 additions & 8 deletions examples/internal/proto/examplepb/flow_combination.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions examples/internal/proto/examplepb/non_standard_names.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions examples/internal/server/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ go_library(
"//examples/internal/proto/examplepb:go_default_library",
"//examples/internal/proto/sub:go_default_library",
"//examples/internal/proto/sub2:go_default_library",
"//runtime:go_default_library",
"@com_github_golang_glog//:go_default_library",
"@com_github_golang_protobuf//proto:go_default_library",
"@com_github_golang_protobuf//protoc-gen-go/generator:go_default_library_gen",
Expand Down
Loading