import "golang.org/x/pkgsite/internal/testing/dbtest"
Package dbtest supports testing with a database.
ConnectAndExecute connects to the postgres database specified by uri and executes dbFunc, then cleans up the database connection. It returns an error that Is derrors.NotFound if no connection could be made.
CreateDB creates a new database dbName.
CreateDBIfNotExists checks whether the given dbName is an existing database, and creates one if not.
DBConnURI generates a postgres connection string in URI format. This is necessary as migrate expects a URI.
DropDB drops the database named dbName.
MultiErr can be used to combine one or more errors into a single error.
Package dbtest imports 10 packages (graph) and is imported by 2 packages. Updated 2021-01-17. Refresh now. Tools for package owners.