lobby.DB test empty impl
parent
71929c8bfa
commit
47321142ea
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue