Documentation
¶
Overview ¶
Package storetest runs the tests of api's database on a real PostgreSQL with no Docker, as the devcontainer and CI have none: embedded-postgres starts one server for a test binary, when its first test asks for a database, migrates a template database once, and gives each test a database of its own made from it, which is a copy and takes milliseconds (R05, R29).
A package whose tests use it runs them under its TestMain:
func TestMain(m *testing.M) { os.Exit(storetest.Main(m)) }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Main ¶
Main runs the tests and then stops the server, if a test started it, and returns the code the test binary exits with.
func OpenFGAURL ¶ added in v0.1.2
OpenFGAURL is the connection string of a database openfga of the test's own: migrated, with the store api and its model, or empty. It is dropped when the test ends.
Types ¶
This section is empty.