TestKeychainGetNotFound exercises the full Get path against the fake — open, resolve collection, search — and asserts an empty search maps to ErrCredentialNotFound, all without a live keyring.
(t *testing.T)
| 203 | // resolve collection, search — and asserts an empty search maps to |
| 204 | // ErrCredentialNotFound, all without a live keyring. |
| 205 | func TestKeychainGetNotFound(t *testing.T) { |
| 206 | fake := &fakeService{} // no items -> not found |
| 207 | withFakeService(t, fake) |
| 208 | |
| 209 | ks := setupKeychain(t, nil) |
| 210 | _, err := ks.Get(t.Context(), store.MustParseID("com.test.test/test/missing")) |
| 211 | assert.ErrorIs(t, err, store.ErrCredentialNotFound) |
| 212 | } |
| 213 | |
| 214 | // TestKeychainGetAllMetadataEmpty is a regression test for `docker pass ls` |
| 215 | // against an empty keychain: listing all is a valid empty result, not a miss, |
nothing calls this directly
no test coverage detected