From 47321142eaf865962c64394b6a36e8059c557041 Mon Sep 17 00:00:00 2001 From: Bel LaPointe <153096461+breel-render@users.noreply.github.com> Date: Sun, 9 Feb 2025 16:57:37 -0700 Subject: [PATCH] lobby.DB test empty impl --- src/state/lobby/storage.go | 6 ------ src/state/lobby/storage_test.go | 11 ++++++++++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/state/lobby/storage.go b/src/state/lobby/storage.go index fd7b84f..34f540c 100644 --- a/src/state/lobby/storage.go +++ b/src/state/lobby/storage.go @@ -5,11 +5,9 @@ import ( "database/sql" "fmt" "gitea/price-is-wrong/src/lib" - "io" ) type Storage interface { - PlayerIDs(context.Context) ([]int, error) } type DB struct{ db *sql.DB } @@ -24,7 +22,3 @@ func NewDB(ctx context.Context) (DB, error) { return DB{db: db}, nil } - -func (db DB) PlayerIDs(ctx context.Context) ([]int, error) { - return nil, io.EOF -} diff --git a/src/state/lobby/storage_test.go b/src/state/lobby/storage_test.go index fad753d..817fb73 100644 --- a/src/state/lobby/storage_test.go +++ b/src/state/lobby/storage_test.go @@ -1,6 +1,15 @@ package lobby_test -import "testing" +import ( + "gitea/price-is-wrong/src/lib" + "gitea/price-is-wrong/src/state/lobby" + "testing" +) func TestDB(t *testing.T) { + db, err := lobby.NewDB(lib.NewTestCtx(t)) + if err != nil { + t.Fatal(err) + } + _ = db }