diff --git a/.github/workflows/router-ci.yaml b/.github/workflows/router-ci.yaml index ba9cec5318..8648c76504 100644 --- a/.github/workflows/router-ci.yaml +++ b/.github/workflows/router-ci.yaml @@ -200,6 +200,7 @@ jobs: './. ./fuzzquery ./lifecycle ./modules', './telemetry', './events', + './connectrpc', ] services: nats: diff --git a/router-tests/connectrpc/connectrpc_client_test.go b/router-tests/connectrpc/connectrpc_client_test.go index 0c2dc38d62..664998c327 100644 --- a/router-tests/connectrpc/connectrpc_client_test.go +++ b/router-tests/connectrpc/connectrpc_client_test.go @@ -196,11 +196,11 @@ func TestConnectRPC_ClientErrorHandling(t *testing.T) { assert.Contains(t, connectErr.Message(), "GraphQL partial success with errors") }) - t.Run("HTTP 404 maps to CodeNotFound", func(t *testing.T) { + t.Run("HTTP 404 maps to CodeUnimplemented", func(t *testing.T) { ts := NewTestConnectRPCServer(t, ConnectRPCServerOptions{ GraphQLHandler: HTTPErrorHandler(http.StatusNotFound, "Not Found"), }) - + err := ts.Start() require.NoError(t, err) @@ -218,7 +218,7 @@ func TestConnectRPC_ClientErrorHandling(t *testing.T) { var connectErr *connect.Error require.ErrorAs(t, err, &connectErr) - assert.Equal(t, connect.CodeNotFound, connectErr.Code()) + assert.Equal(t, connect.CodeUnimplemented, connectErr.Code()) }) t.Run("HTTP 500 maps to CodeInternal", func(t *testing.T) { diff --git a/router-tests/connectrpc/connectrpc_server_lifecycle_test.go b/router-tests/connectrpc/connectrpc_server_lifecycle_test.go index 5a08d0531c..2c837a8dec 100644 --- a/router-tests/connectrpc/connectrpc_server_lifecycle_test.go +++ b/router-tests/connectrpc/connectrpc_server_lifecycle_test.go @@ -37,7 +37,7 @@ func TestConnectRPC_ServerLifecycle_StartStopReload(t *testing.T) { t.Run("stop without start returns error", func(t *testing.T) { server, err := connectrpc.NewServer(connectrpc.ServerConfig{ - ServicesDir: "../../router/pkg/connectrpc/samples/services", + ServicesDir: "../../router/pkg/connectrpc/testdata/services", GraphQLEndpoint: "http://localhost:4000/graphql", Logger: zap.NewNop(), }) diff --git a/router-tests/connectrpc/connectrpc_test_helpers.go b/router-tests/connectrpc/connectrpc_test_helpers.go index e71922eed0..97edf73dee 100644 --- a/router-tests/connectrpc/connectrpc_test_helpers.go +++ b/router-tests/connectrpc/connectrpc_test_helpers.go @@ -95,7 +95,7 @@ func NewTestConnectRPCServer(t *testing.T, opts ConnectRPCServerOptions) *TestCo // Set defaults if opts.ServicesDir == "" { - opts.ServicesDir = "../../router/pkg/connectrpc/samples/services" + opts.ServicesDir = "../../router/pkg/connectrpc/testdata/services" } if opts.ListenAddr == "" { opts.ListenAddr = "localhost:0"