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 one after another. Use it for tests that toggle global settings, which the parallel StartTestDBHandler run would turn into data races.
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
}
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.