Documentation
¶
Overview ¶
assertdb is a helper for testing package. It seeds/asserts the database with the data from the specified YAML file.
It assumes the yaml is in embed.FS
//go:embed dataset/*
var dataSet embed.FS
func TestUsage(t *testing.T) {
assertdb.SeedDataSet(t, "sqlite://file:database.db", dataSet, "initial.yaml", nil)
// some logic that modifies the database
assertdb.AssertDB(t, "sqlite://file:database.db", dataSet, "expect.yaml", nil)
}
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.