Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test (cache/search): fix NewTestServer(...) storage #5081

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/clientcache/cmd/search/search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ func TestSearch(t *testing.T) {
assert.Nil(t, apiErr)
assert.NotNil(t, resp)
assert.NotNil(t, r)
assert.EqualValues(t, r, &daemon.SearchResult{
assert.EqualValues(t, &daemon.SearchResult{
RefreshStatus: daemon.NotRefreshing,
})
}, r)
})

t.Run("empty response from query", func(t *testing.T) {
Expand Down
3 changes: 3 additions & 0 deletions internal/clientcache/internal/daemon/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ func NewTestServer(t *testing.T, cmd Commander, opt ...Option) *TestServer {
RecheckSupportInterval: DefaultRecheckSupportInterval,
LogWriter: io.Discard,
DotDirectory: dotDir,
// we need to provide this, otherwise it will open a store in the user's
// home dir. See db.Open(...)
DatabaseUrl: dotDir + "cache.db?_pragma=foreign_keys(1)",
}

s, err := New(ctx, cfg)
Expand Down
Loading