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

Function overrideActorTokenGood

credentials/sts/sts_test.go:174–180  ·  view source on GitHub ↗

Overrides the actor token read to return a const which we can compare in our tests.

()

Source from the content-addressed store, hash-verified

172// Overrides the actor token read to return a const which we can compare in
173// our tests.
174func overrideActorTokenGood() func() {
175 origReadActorTokenFrom := readActorTokenFrom
176 readActorTokenFrom = func(string) ([]byte, error) {
177 return []byte(actorTokenContents), nil
178 }
179 return func() { readActorTokenFrom = origReadActorTokenFrom }
180}
181
182// Overrides the actor token read to always return an error.
183func overrideActorTokenError() func() {

Callers 1

TestConstructRequestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected