Overrides the subject token read to return a const which we can compare in our tests.
()
| 153 | // Overrides the subject token read to return a const which we can compare in |
| 154 | // our tests. |
| 155 | func overrideSubjectTokenGood() func() { |
| 156 | origReadSubjectTokenFrom := readSubjectTokenFrom |
| 157 | readSubjectTokenFrom = func(string) ([]byte, error) { |
| 158 | return []byte(subjectTokenContents), nil |
| 159 | } |
| 160 | return func() { readSubjectTokenFrom = origReadSubjectTokenFrom } |
| 161 | } |
| 162 | |
| 163 | // Overrides the subject token read to always return an error. |
| 164 | func overrideSubjectTokenError() func() { |
no outgoing calls
no test coverage detected