Skip to content

Commit

Permalink
chore(deps): bump the all group with 4 updates
Browse files Browse the repository at this point in the history
Bumps the all group with 4 updates: [golang.org/x/net](https://github.com/golang/net), [golang.org/x/oauth2](https://github.com/golang/oauth2), [golang.org/x/sync](https://github.com/golang/sync) and [google.golang.org/grpc](https://github.com/grpc/grpc-go).

Updates `golang.org/x/net` from 0.22.0 to 0.24.0
- [Commits](golang/net@v0.22.0...v0.24.0)

Updates `golang.org/x/oauth2` from 0.18.0 to 0.19.0
- [Commits](golang/oauth2@v0.18.0...v0.19.0)

Updates `golang.org/x/sync` from 0.6.0 to 0.7.0
- [Commits](golang/sync@v0.6.0...v0.7.0)

Updates `google.golang.org/grpc` from 1.62.1 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.62.1...v1.63.0)
- Change deprecated `Dial` and `DialContext` methods to `NewClient`

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
  • Loading branch information
dependabot[bot] authored and alethenorio committed Apr 9, 2024
1 parent 009c5f2 commit 8f44c89
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion cloudclient/dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func DialService(ctx context.Context, target string, opts ...grpc.DialOption) (*
PermitWithoutStream: true,
}),
}
conn, err := grpc.DialContext(ctx, withDefaultPort(target, 443), append(defaultOpts, opts...)...)
conn, err := grpc.NewClient(withDefaultPort(target, 443), append(defaultOpts, opts...)...)
if err != nil {
return nil, fmt.Errorf("dial %s: %w", target, err)
}
Expand Down
2 changes: 1 addition & 1 deletion cloudclient/dialinsecure.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func DialServiceInsecure(ctx context.Context, target string, opts ...grpc.DialOp
grpc.WithPerRPCCredentials(insecureTokenSource{TokenSource: idTokenSource}),
grpc.WithTransportCredentials(insecure.NewCredentials()),
}
conn, err := grpc.DialContext(ctx, parsedTarget.Host, append(defaultOpts, opts...)...)
conn, err := grpc.NewClient(parsedTarget.Host, append(defaultOpts, opts...)...)
if err != nil {
return nil, fmt.Errorf("dial insecure '%s': %w", target, err)
}
Expand Down
2 changes: 1 addition & 1 deletion cloudmux/mux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func (fx *testFixture) listen() {

func greeterClient(t *testing.T, addr net.Addr) helloworld.GreeterClient {
t.Helper()
conn, err := grpc.Dial(
conn, err := grpc.NewClient(
addr.String(),
grpc.WithBlock(),
grpc.WithTransportCredentials(insecure.NewCredentials()),
Expand Down
19 changes: 9 additions & 10 deletions cloudserver/middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func bufDialer(lis *bufconn.Listener) func(context.Context, string) (net.Conn, e

func TestGRPCUnary_ContextTimeoutWithDeadlineExceededErr(t *testing.T) {
ctx := context.Background()
server, client := grpcSetup(ctx, t)
server, client := grpcSetup(t)
server.deadlineExceeeded = true

_, err := client.Ping(ctx, &testproto.PingRequest{})
Expand All @@ -78,7 +78,7 @@ func TestGRPCUnary_ContextTimeoutWithDeadlineExceededErr(t *testing.T) {

func TestGRPCUnary_RescuePanicsWithStatusInternalError(t *testing.T) {
ctx := context.Background()
server, client := grpcSetup(ctx, t)
server, client := grpcSetup(t)
server.panicOnRequest = true

_, err := client.Ping(ctx, &testproto.PingRequest{})
Expand All @@ -87,7 +87,7 @@ func TestGRPCUnary_RescuePanicsWithStatusInternalError(t *testing.T) {

func TestGRPCStream_ContextTimeoutWithDeadlineExceededErr(t *testing.T) {
ctx := context.Background()
server, client := grpcSetup(ctx, t)
server, client := grpcSetup(t)
server.deadlineExceeeded = true

stream, err := client.PingStream(ctx)
Expand All @@ -98,7 +98,7 @@ func TestGRPCStream_ContextTimeoutWithDeadlineExceededErr(t *testing.T) {

func TestGRPCStream_RescuePanicsWithStatusInternalError(t *testing.T) {
ctx := context.Background()
server, client := grpcSetup(ctx, t)
server, client := grpcSetup(t)
server.panicOnRequest = true

stream, err := client.PingStream(ctx)
Expand All @@ -110,15 +110,15 @@ func TestGRPCStream_RescuePanicsWithStatusInternalError(t *testing.T) {

func TestGRPCUnary_NoRequestError(t *testing.T) {
ctx := context.Background()
_, client := grpcSetup(ctx, t)
_, client := grpcSetup(t)

_, err := client.Ping(ctx, &testproto.PingRequest{})
assert.NilError(t, err)
}

func TestGRPCStream_NoRequestError(t *testing.T) {
ctx := context.Background()
_, client := grpcSetup(ctx, t)
_, client := grpcSetup(t)

stream, err := client.PingStream(ctx)
assert.NilError(t, err) // while it looks strange, this is setting up the stream
Expand All @@ -129,7 +129,7 @@ func TestGRPCStream_NoRequestError(t *testing.T) {
assert.Error(t, err, "EOF")
}

func grpcSetup(ctx context.Context, t *testing.T) (*Server, testproto.TestServiceClient) {
func grpcSetup(t *testing.T) (*Server, testproto.TestServiceClient) {
lis := bufconn.Listen(bufSize)
middleware := cloudserver.Middleware{Config: cloudserver.Config{Timeout: time.Second * 5}}
server := grpc.NewServer(
Expand All @@ -143,9 +143,8 @@ func grpcSetup(ctx context.Context, t *testing.T) (*Server, testproto.TestServic
log.Fatalf("Server exited with error: %v", err)
}
}()
conn, err := grpc.DialContext(
ctx,
"bufnet",
conn, err := grpc.NewClient(
"passthrough://bufnet",
grpc.WithContextDialer(bufDialer(lis)),
grpc.WithTransportCredentials(insecure.NewCredentials()),
)
Expand Down

0 comments on commit 8f44c89

Please sign in to comment.