1 package bdb_test
2 3 // This file intended to be copied into each backend driver directory. Each driver should have their own driver_test.go
4 // file which creates a database and invokes the testInterface function in this file to ensure the driver properly
5 // implements the interface. See the bdb backend driver for a working example.
6 //
7 // NOTE: When copying this file into the backend driver folder, the package name will need to be changed accordingly.
8 import (
9 "os"
10 "testing"
11 12 "github.com/p9c/p9/pkg/walletdb/ci"
13 )
14 15 // TestInterface performs all interfaces tests for this database driver.
16 func TestInterface(t *testing.T) {
17 18 dbPath := "interfacetest.db"
19 defer func() {
20 if e := os.RemoveAll(dbPath); E.Chk(e) {
21 }
22 }()
23 ci.TestInterface(t, dbType, dbPath)
24 }
25