testlib

package
v5.10.0-rc4+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2019 License: AGPL-3.0, Apache-2.0 Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

testlib exposes helper methods for running unit tests against a containerized test store.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupTestResources

func SetupTestResources() (string, error)

Types

type FakeClusterInterface

type FakeClusterInterface struct {
	// contains filtered or unexported fields
}

func (*FakeClusterInterface) ConfigChanged

func (c *FakeClusterInterface) ConfigChanged(previousConfig *model.Config, newConfig *model.Config, sendToOtherServer bool) *model.AppError

func (*FakeClusterInterface) GetClusterId

func (c *FakeClusterInterface) GetClusterId() string

func (*FakeClusterInterface) GetClusterInfos

func (c *FakeClusterInterface) GetClusterInfos() []*model.ClusterInfo

func (*FakeClusterInterface) GetClusterStats

func (c *FakeClusterInterface) GetClusterStats() ([]*model.ClusterStats, *model.AppError)

func (*FakeClusterInterface) GetLogs

func (c *FakeClusterInterface) GetLogs(page, perPage int) ([]string, *model.AppError)

func (*FakeClusterInterface) GetMyClusterInfo

func (c *FakeClusterInterface) GetMyClusterInfo() *model.ClusterInfo

func (*FakeClusterInterface) GetPluginStatuses

func (c *FakeClusterInterface) GetPluginStatuses() (model.PluginStatuses, *model.AppError)

func (*FakeClusterInterface) IsLeader

func (c *FakeClusterInterface) IsLeader() bool

func (*FakeClusterInterface) NotifyMsg

func (c *FakeClusterInterface) NotifyMsg(buf []byte)

func (*FakeClusterInterface) RegisterClusterMessageHandler

func (c *FakeClusterInterface) RegisterClusterMessageHandler(event string, crm einterfaces.ClusterMessageHandler)

func (*FakeClusterInterface) SendClearRoleCacheMessage

func (c *FakeClusterInterface) SendClearRoleCacheMessage()

func (*FakeClusterInterface) SendClusterMessage

func (c *FakeClusterInterface) SendClusterMessage(cluster *model.ClusterMessage)

func (*FakeClusterInterface) StartInterNodeCommunication

func (c *FakeClusterInterface) StartInterNodeCommunication()

func (*FakeClusterInterface) StopInterNodeCommunication

func (c *FakeClusterInterface) StopInterNodeCommunication()

type HelperOptions

type HelperOptions struct {
	EnableStore     bool
	EnableResources bool
}

type MainHelper

type MainHelper struct {
	Settings         *model.SqlSettings
	Store            store.Store
	SqlSupplier      *sqlstore.SqlSupplier
	ClusterInterface *FakeClusterInterface
	// contains filtered or unexported fields
}

func NewMainHelper

func NewMainHelper() *MainHelper

func NewMainHelperWithOptions

func NewMainHelperWithOptions(options *HelperOptions) *MainHelper

func (*MainHelper) Close

func (h *MainHelper) Close() error

func (*MainHelper) GetClusterInterface

func (h *MainHelper) GetClusterInterface() *FakeClusterInterface

func (*MainHelper) GetSqlSettings

func (h *MainHelper) GetSqlSettings() *model.SqlSettings

func (*MainHelper) GetSqlSupplier

func (h *MainHelper) GetSqlSupplier() *sqlstore.SqlSupplier

func (*MainHelper) GetStore

func (h *MainHelper) GetStore() store.Store

func (*MainHelper) Main

func (h *MainHelper) Main(m *testing.M)

type TestStore

type TestStore struct {
	store.Store
}

func (*TestStore) Close

func (s *TestStore) Close()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL