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

Function overrideActorTokenError

credentials/sts/sts_test.go:183–189  ·  view source on GitHub ↗

Overrides the actor token read to always return an error.

()

Source from the content-addressed store, hash-verified

181
182// Overrides the actor token read to always return an error.
183func overrideActorTokenError() func() {
184 origReadActorTokenFrom := readActorTokenFrom
185 readActorTokenFrom = func(string) ([]byte, error) {
186 return nil, errors.New("error reading actor token")
187 }
188 return func() { readActorTokenFrom = origReadActorTokenFrom }
189}
190
191// compareRequest compares the http.Request received in the test with the
192// expected requestParameters specified in wantReqParams.

Callers 1

TestConstructRequestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected