func TestSessionDatabase(t *testing.T) {
	DB = new(SqliteBackend)
	DB.DSN("~/.config/wavepipe/wavepipe.db")
	if err := DB.Open(); err != nil {
		t.Fatalf("Could not open database connection: %s", err.Error())
	}
	defer DB.Close()
	session, err := NewSession(1, "TestPassword", "TestClient")
	if err != nil {
		t.Fatalf("Could not create and save session: %s", err.Error())
	}
	if err := session.Load(); err != nil {
		t.Fatalf("Could not load session: %s", err.Error())
	}
	if err := session.Delete(); err != nil {
		t.Fatalf("Could not delete session: %s", err.Error())
	}
}
TestSessionDatabase verifies that an Session can be saved and loaded from the database
package data
import (
	"testing"
)