mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-01 18:33:19 +02:00
databroker: require JWT for access (#1503)
This commit is contained in:
parent
27d0cf180a
commit
eb79cc0957
11 changed files with 188 additions and 79 deletions
|
@ -6,7 +6,6 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.opencensus.io/plugin/ocgrpc"
|
||||
"google.golang.org/grpc"
|
||||
grpcstats "google.golang.org/grpc/stats"
|
||||
)
|
||||
|
||||
|
@ -36,27 +35,3 @@ func Test_GRPCServerStatsHandler(t *testing.T) {
|
|||
assert.Equal(t, ctx.Value(mockCtxTag("added")), "true")
|
||||
assert.Equal(t, ctx.Value(mockCtxTag("original")), "true")
|
||||
}
|
||||
|
||||
type mockDialOption struct {
|
||||
name string
|
||||
grpc.EmptyDialOption
|
||||
}
|
||||
|
||||
func Test_NewGRPCClientStatsHandler(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
h := NewGRPCClientStatsHandler("test")
|
||||
|
||||
origOpts := []grpc.DialOption{
|
||||
mockDialOption{name: "one"},
|
||||
mockDialOption{name: "two"},
|
||||
}
|
||||
|
||||
newOpts := h.DialOptions(origOpts...)
|
||||
|
||||
for i := range origOpts {
|
||||
assert.Contains(t, newOpts, origOpts[i])
|
||||
}
|
||||
|
||||
assert.Greater(t, len(newOpts), len(origOpts))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue