assertStoredValue asserts the secret stored under id "foo" — every set-test uses that id, so the helpers hard-code it rather than carrying a parameter that always receives the same string.
(t *testing.T, kc store.Store, want string)
| 256 | // uses that id, so the helpers hard-code it rather than carrying a parameter |
| 257 | // that always receives the same string. |
| 258 | func assertStoredValue(t *testing.T, kc store.Store, want string) { |
| 259 | t.Helper() |
| 260 | s, err := kc.Get(t.Context(), secrets.MustParseID("foo")) |
| 261 | require.NoError(t, err) |
| 262 | impl, ok := s.(*pass.PassValue) |
| 263 | require.True(t, ok) |
| 264 | got, err := impl.Marshal() |
| 265 | require.NoError(t, err) |
| 266 | assert.Equal(t, want, string(got)) |
| 267 | } |
| 268 | |
| 269 | func assertStoredMetadata(t *testing.T, kc store.Store, want map[string]string) { |
| 270 | t.Helper() |
no test coverage detected