Note that NewIsolatedTestConfig sets up a Mock keyring as well
(t *testing.T)
| 14 | |
| 15 | // Note that NewIsolatedTestConfig sets up a Mock keyring as well |
| 16 | func newTestAuthConfig(t *testing.T) *AuthConfig { |
| 17 | cfg, _ := NewIsolatedTestConfig(t, "") |
| 18 | // Neutralize the cross-process lock and disk reload so tests never take a real filesystem lock or read from disk. |
| 19 | return &AuthConfig{ |
| 20 | cfg: cfg.cfg, |
| 21 | acquireRefreshLock: func(ctx context.Context, path string) (func(), error) { |
| 22 | return func() {}, nil |
| 23 | }, |
| 24 | reloadConfig: func() error { |
| 25 | return nil |
| 26 | }, |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | func TestTokenFromKeyring(t *testing.T) { |
| 31 | // Given a keyring that contains a token for a host |
no test coverage detected