func setup() error {
	removeFiles()
	_ = os.Mkdir(testingDirName, 0700)
	logging := logger.Configuration{
		Directory: testingDirName,
		File:      "testing.log",
		Size:      1048576,
		Count:     10,
		Console:   false,
		Levels: map[string]string{
			logger.DefaultTag: "critical",
		},
	}
	_ = logger.Initialise(logging)
	err := Initialise(databaseFileName, false)
	if nil != err {
		return fmt.Errorf("storage initialise error: %s", err.Error())
	}
	return nil
}
configure for testing
package storage
import (
	"fmt"
	"os"
	"testing"
	"github.com/bitmark-inc/logger"
)
const (
	testingDirName   = "testing"
	databaseFileName = testingDirName + "/test"
)
func TestMain(m *testing.M) {
	if err := setup(); err != nil {
		os.Exit(1)
	}
	initialiseVars()
	result := m.Run()
	teardownTestDataAccess()
	teardown()
	os.Exit(result)
}
func removeFiles() {
	_ = os.RemoveAll(testingDirName)
}