Skip to content
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
1 change: 1 addition & 0 deletions .github/workflows/router-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ jobs:
'./. ./fuzzquery ./lifecycle ./modules',
'./telemetry',
'./events',
'./connectrpc',
]
services:
nats:
Expand Down
6 changes: 3 additions & 3 deletions router-tests/connectrpc/connectrpc_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
})
Expand Down
2 changes: 1 addition & 1 deletion router-tests/connectrpc/connectrpc_test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading