feat(11.1-04): add the Database section and the core Services pages
- docs/database: models, migrations, queries and pagination, relations, casts and validation, attachments and transactions (lagoon.Transaction, lagoon.AfterCommit, nested savepoints, lagoon.OnDatabase) - docs/services: configuration, events, routing with auth groups, rate limiting, authentication, the OAuth server, mail and localization - runnable Examples for lagoon, attach, compass, surf, wire, bouncer, wristband, postcard, phrasebook and festival; lagoon TestDocs* regions run on the package's Postgres harness through DocsDB - 15 new required pages
This commit is contained in:
21
modules/lagoon/export_docs_test.go
Normal file
21
modules/lagoon/export_docs_test.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package lagoon
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// DocsDB returns a GORM handle on a fresh ICU pl-PL database named name in
|
||||
// this package's Postgres harness, for the database-backed docs examples in
|
||||
// example_test.go. It skips under -short and fails when the harness has no
|
||||
// database, like the package's other database tests.
|
||||
func DocsDB(t *testing.T, name string) *gorm.DB {
|
||||
t.Helper()
|
||||
db, _ := dedicatedDB(t, name)
|
||||
gdb, err := Use(t.Context(), db)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
return gdb
|
||||
}
|
||||
Reference in New Issue
Block a user