rehabilitate storage test

This commit is contained in:
lash 2025-01-20 12:31:20 +00:00
parent 874edb3da6
commit 90ecec1798
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
3 changed files with 8 additions and 7 deletions

2
go.mod
View File

@ -3,7 +3,7 @@ module git.grassecon.net/grassrootseconomics/visedriver
go 1.23.0
require (
git.defalsify.org/vise.git v0.2.3-0.20250119110446-6c29d5ba580a
git.defalsify.org/vise.git v0.2.3-0.20250119111745-4f69d6fe5939
github.com/jackc/pgx/v5 v5.7.1
github.com/joho/godotenv v1.5.1
)

4
go.sum
View File

@ -1,5 +1,5 @@
git.defalsify.org/vise.git v0.2.3-0.20250119110446-6c29d5ba580a h1:LXg7l5g3jiNSKWCwjO2nmMyZcNYZzuNPyuxiFtfOE6U=
git.defalsify.org/vise.git v0.2.3-0.20250119110446-6c29d5ba580a/go.mod h1:jyBMe1qTYUz3mmuoC9JQ/TvFeW0vTanCUcPu3H8p4Ck=
git.defalsify.org/vise.git v0.2.3-0.20250119111745-4f69d6fe5939 h1:DA0gus9TuKpLvZMDmmqCAwAr5Lly+U93jtO2OKtGAeo=
git.defalsify.org/vise.git v0.2.3-0.20250119111745-4f69d6fe5939/go.mod h1:jyBMe1qTYUz3mmuoC9JQ/TvFeW0vTanCUcPu3H8p4Ck=
github.com/barbashov/iso639-3 v0.0.0-20211020172741-1f4ffb2d8d1c h1:H9Nm+I7Cg/YVPpEV1RzU3Wq2pjamPc/UtHDgItcb7lE=
github.com/barbashov/iso639-3 v0.0.0-20211020172741-1f4ffb2d8d1c/go.mod h1:rGod7o6KPeJ+hyBpHfhi4v7blx9sf+QsHsA7KAsdN6U=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=

View File

@ -19,7 +19,7 @@ func TestMenuStorageServiceOneSet(t *testing.T) {
if err != nil {
t.Fatal(err)
}
conns.Set(STORETYPE_STATE, connData)
conns.Set(connData, STORETYPE_STATE)
ctx := context.Background()
ms := NewMenuStorageService(conns)
@ -48,7 +48,7 @@ func TestMenuStorageServiceExplicit(t *testing.T) {
if err != nil {
t.Fatal(err)
}
conns.Set(STORETYPE_STATE, connData)
conns.Set(connData, STORETYPE_STATE)
ctx := context.Background()
d, err = os.MkdirTemp("", "visedriver-menustorageservice")
@ -90,10 +90,11 @@ func TestMenuStorageServiceReuse(t *testing.T) {
if err != nil {
t.Fatal(err)
}
conns.Set(STORETYPE_STATE, connData)
conns.Set(STORETYPE_USER, connData)
conns.Set(connData, STORETYPE_STATE)
conns.Set(connData, STORETYPE_USER)
ctx := context.Background()
ctx = context.WithValue(ctx, "SessionId", "foo")
ms := NewMenuStorageService(conns)
stateStore, err := ms.GetStateStore(ctx)
if err != nil {