MCPcopy
hub / github.com/grpc/grpc-go / createTestContext

Function createTestContext

credentials/sts/sts_test.go:98–105  ·  view source on GitHub ↗
(ctx context.Context, s credentials.SecurityLevel)

Source from the content-addressed store, hash-verified

96}
97
98func createTestContext(ctx context.Context, s credentials.SecurityLevel) context.Context {
99 auth := &testAuthInfo{CommonAuthInfo: credentials.CommonAuthInfo{SecurityLevel: s}}
100 ri := credentials.RequestInfo{
101 Method: "testInfo",
102 AuthInfo: auth,
103 }
104 return credentials.NewContextWithRequestInfo(ctx, ri)
105}
106
107// errReader implements the io.Reader interface and returns an error from the
108// Read method.

Calls 1

Tested by

no test coverage detected