From 06c534cbb1c2b513a1ac6f1485c57f87ff3b1918 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Mon, 24 Mar 2025 20:03:20 +0300 Subject: [PATCH] remove the subprefix db from TestViewVoucher --- handlers/application/menuhandler_test.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/handlers/application/menuhandler_test.go b/handlers/application/menuhandler_test.go index 64df15d..c83416d 100644 --- a/handlers/application/menuhandler_test.go +++ b/handlers/application/menuhandler_test.go @@ -2156,15 +2156,11 @@ func TestViewVoucher(t *testing.T) { } ctx, store := InitializeTestStore(t) sessionId := "session123" - ctx = context.WithValue(ctx, "SessionId", sessionId) - spdb := InitializeTestSubPrefixDb(t, ctx) - h := &MenuHandlers{ userdataStore: store, flagManager: fm, - prefixDb: spdb, } // Define mock voucher data @@ -2177,7 +2173,7 @@ func TestViewVoucher(t *testing.T) { // Put the data for key, value := range mockData { - err = spdb.Put(ctx, []byte(storedb.ToBytes(key)), []byte(value)) + err := store.WriteEntry(ctx, sessionId, key, []byte(value)) if err != nil { t.Fatal(err) }