(t *testing.T)
| 28 | } |
| 29 | |
| 30 | func TestChainRetriever_FallbackOnError(t *testing.T) { |
| 31 | chain := NewChain( |
| 32 | &mockRetriever{err: errors.New("first failed")}, |
| 33 | &mockRetriever{key: []byte("fallback-key")}, |
| 34 | ) |
| 35 | key, err := chain.RetrieveKey(Hints{KeychainLabel: "Chrome"}) |
| 36 | require.NoError(t, err) |
| 37 | assert.Equal(t, []byte("fallback-key"), key) |
| 38 | } |
| 39 | |
| 40 | func TestChainRetriever_AllFail(t *testing.T) { |
| 41 | chain := NewChain( |
nothing calls this directly
no test coverage detected