Skip to content

Commit

Permalink
ref: add ctx on getclient badgerdb method
Browse files Browse the repository at this point in the history
  • Loading branch information
kenriortega committed Nov 14, 2021
1 parent 80d32af commit 0eb7ea6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/proxy/services/proxy_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package proxy

import (
"context"

domain "github.com/kenriortega/ngonx/internal/proxy/domain"
"github.com/kenriortega/ngonx/pkg/badgerdb"

Expand All @@ -10,7 +12,7 @@ import (
var proxyRepository domain.ProxyRepository

func Test_SaveSecretKEY(t *testing.T) {
clientBadger := badgerdb.GetBadgerDB(false)
clientBadger := badgerdb.GetBadgerDB(context.Background(), false)
proxyRepository = domain.NewProxyRepository(clientBadger)
err := proxyRepository.SaveKEY("badger", "key", "apikey")
if err != nil {
Expand All @@ -19,7 +21,7 @@ func Test_SaveSecretKEY(t *testing.T) {
}

func Test_GetKEY(t *testing.T) {
clientBadger := badgerdb.GetBadgerDB(false)
clientBadger := badgerdb.GetBadgerDB(context.Background(), false)
proxyRepository = domain.NewProxyRepository(clientBadger)
result, err := proxyRepository.GetKEY("badger", "key")
if err != nil {
Expand Down

0 comments on commit 0eb7ea6

Please sign in to comment.