Files
zeekay c01e5afcae refactor: own the module path (github.com/hanzoai/grpc-web)
Per the standing fork rule, a hanzoai fork declares its OWN module path and
is required directly -- never resolved via a `replace` against the upstream
path. Keeping the upstream path meant every consumer's import line carried
the upstream brand.

  module github.com/traefik/grpc-web -> module github.com/hanzoai/grpc-web

All occurrences were import paths (package self-imports plus the test
servers and the react example server). go/grpcweb -- the package Hanzo
Ingress links -- is green.
2026-07-25 12:27:26 -07:00

37 lines
1.1 KiB
Go

// Copyright 2017 Improbable. All Rights Reserved.
// See LICENSE for licensing terms.
package grpcweb_test
import (
"sort"
"testing"
testproto "github.com/hanzoai/grpc-web/integration_test/go/_proto/improbable/grpcweb/test"
"github.com/stretchr/testify/assert"
"github.com/hanzoai/grpc-web/go/grpcweb"
"google.golang.org/grpc"
)
func TestListGRPCResources(t *testing.T) {
server := grpc.NewServer()
testproto.RegisterTestServiceServer(server, &testServiceImpl{})
expected := []string{
"/improbable.grpcweb.test.TestService/PingEmpty",
"/improbable.grpcweb.test.TestService/Ping",
"/improbable.grpcweb.test.TestService/PingError",
"/improbable.grpcweb.test.TestService/PingList",
"/improbable.grpcweb.test.TestService/Echo",
"/improbable.grpcweb.test.TestService/PingPongBidi",
"/improbable.grpcweb.test.TestService/PingStream",
}
actual := grpcweb.ListGRPCResources(server)
sort.Strings(expected)
sort.Strings(actual)
assert.EqualValues(t,
expected,
actual,
"list grpc resources must provide an exhaustive list of all registered handlers")
}