From dd68806cdcb2af1e9d5141993f425528b5e908ab Mon Sep 17 00:00:00 2001 From: caffix Date: Mon, 18 Nov 2024 19:31:00 -0500 Subject: [PATCH] fixes --- cache/cache_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cache/cache_test.go b/cache/cache_test.go index 0aea64d..af14589 100644 --- a/cache/cache_test.go +++ b/cache/cache_test.go @@ -44,10 +44,10 @@ func createTestRepositories() (repository.Repository, repository.Repository, err } dsn := fmt.Sprintf("host=localhost port=5432 user=%s password=%s dbname=%s", "postgres", "postgres", "postgres") - db := assetdb.New(sqlrepo.Postgres, dsn) - if db == nil { + db, err := repository.New(sqlrepo.Postgres, dsn) + if err != nil || db == nil { return nil, nil, errors.New("failed to create the database") } - return cache.Repo, db.Repo, nil + return cache.Repo, db, nil }