Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TestAssets embed.FS
Functions ¶
func ArrayToPool ¶
func ArrayToPool(array []string)
func GenerateDBAuthor ¶
func GetTestAssets ¶
func RunSequentialMemorySQLite ¶ added in v0.6.8
func RunSequentialMemorySQLite(t *testing.T, conf TestRunConfig)
RunSequentialMemorySQLite runs conf against the in-process datastores only (Memory and SQLite), for tests that don't need the SQL servers.
Types ¶
type TestDBHandler ¶
type TestDBHandler struct {
// contains filtered or unexported fields
}
func NewTestDBHandler ¶
func NewTestDBHandler(t *testing.T) *TestDBHandler
func (*TestDBHandler) AddTests ¶
func (test *TestDBHandler) AddTests(testConfs ...TestRunConfig)
func (*TestDBHandler) StartTestDBHandler ¶
func (test *TestDBHandler) StartTestDBHandler()
type TestDataStore ¶
type TestDataStore struct {
DS db.DataStore
Logger *zap.SugaredLogger
Hooks *hooks2.Hook
ReadOnlyManager *pad.ReadOnlyManager
SecurityManager *pad.SecurityManager
AuthorManager *author.Manager
PadManager *pad.Manager
PadMessageHandler *ws.PadMessageHandler
AdminMessageHandler *ws.AdminMessageHandler
MockWebSocket *ws.MockWebSocketConn
Validator *validator.Validate
Hub *ws.Hub
App *fiber.App
PrivateAPI fiber.Router
Importer *io.Importer
// Settings is this test's own copy of the settings. The SecurityManager
// and the InitStore read it, so a test may change it without affecting
// tests running in parallel.
Settings *settings.Settings
}
func (*TestDataStore) ToInitStore ¶
func (t *TestDataStore) ToInitStore() *lib.InitStore
func (*TestDataStore) ToPluginStore ¶ added in v0.0.5
func (t *TestDataStore) ToPluginStore() *interfaces.EpPluginStore
type TestRunConfig ¶
type TestRunConfig struct {
Name string
Test func(t *testing.T, tsStore TestDataStore)
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.