Skip to content

Commit 5da586f

Browse files
GustavoStingelinyyforyongyu
authored andcommitted
wallet: add itest for store creation
1 parent f028d0f commit 5da586f

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//go:build itest
2+
3+
package itest
4+
5+
import (
6+
"testing"
7+
8+
"github.com/stretchr/testify/require"
9+
)
10+
11+
func TestNewTestStore(t *testing.T) {
12+
t.Parallel()
13+
14+
// This test store exercises the underlying database connector in a test
15+
// environment, so we can verify that the store is created successfully with
16+
// a valid database connection and later properly closed. Will test all
17+
// backends (SQLite, PostgreSQL) based in the build tags.
18+
store := NewTestStore(t)
19+
20+
require.NotNil(t, store)
21+
require.NotNil(t, store.DB())
22+
require.NotNil(t, store.Queries())
23+
require.NoError(t, store.Close())
24+
}

0 commit comments

Comments
 (0)