(t *testing.T)
| 852 | } |
| 853 | |
| 854 | func setup(t *testing.T) (db database.Store, cryptDB *dbCrypt, cs []Cipher) { |
| 855 | t.Helper() |
| 856 | rawDB, _ := dbtestutil.NewDB(t) |
| 857 | cs = append(cs, initCipher(t)) |
| 858 | cdb, err := New(context.Background(), rawDB, cs...) |
| 859 | require.NoError(t, err) |
| 860 | cryptDB, ok := cdb.(*dbCrypt) |
| 861 | require.True(t, ok) |
| 862 | return rawDB, cryptDB, cs |
| 863 | } |
| 864 | |
| 865 | func setupNoCiphers(t *testing.T) (db database.Store, cryptodb *dbCrypt) { |
| 866 | t.Helper() |
no test coverage detected