(t *testing.T)
| 38 | } |
| 39 | |
| 40 | func TestChainRetriever_AllFail(t *testing.T) { |
| 41 | chain := NewChain( |
| 42 | &mockRetriever{err: errors.New("first failed")}, |
| 43 | &mockRetriever{err: errors.New("second failed")}, |
| 44 | ) |
| 45 | key, err := chain.RetrieveKey(Hints{KeychainLabel: "Chrome"}) |
| 46 | require.Error(t, err) |
| 47 | assert.Nil(t, key) |
| 48 | assert.Contains(t, err.Error(), "all retrievers failed") |
| 49 | assert.Contains(t, err.Error(), "first failed") |
| 50 | assert.Contains(t, err.Error(), "second failed") |
| 51 | } |
| 52 | |
| 53 | func TestChainRetriever_SkipEmptyKey(t *testing.T) { |
| 54 | // First returns nil key without error — should skip to next |
nothing calls this directly
no test coverage detected