sequencedAuthConfig returns a different credential on each call and records the hostname it was asked about, so a test can prove the transport resolves a token per request rather than once at construction time.
| 22 | // sequencedAuthConfig returns a different credential on each call and records the hostname it was asked about, so a |
| 23 | // test can prove the transport resolves a token per request rather than once at construction time. |
| 24 | type sequencedAuthConfig struct { |
| 25 | creds []gh.Credential |
| 26 | status gh.RefreshStatus |
| 27 | err error |
| 28 | calls []string |
| 29 | } |
| 30 | |
| 31 | func (s *sequencedAuthConfig) ActiveTokenWithRefresh(hostname string) (gh.Credential, gh.RefreshStatus, error) { |
| 32 | cred := s.creds[len(s.calls)] |
nothing calls this directly
no outgoing calls
no test coverage detected