storetest

package
v5.11.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: AGPL-3.0, Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupSqlSettings

func CleanupSqlSettings(settings *model.SqlSettings)

func MakeEmail

func MakeEmail() string

func MakeSqlSettings

func MakeSqlSettings(driver string) *model.SqlSettings

MakeSqlSettings creates a randomly named database and returns the corresponding sql settings

func MySQLSettings

func MySQLSettings() *model.SqlSettings

MySQLSettings returns the database settings to connect to the MySQL unittesting database. The database name is generated randomly and must be created before use.

func NewStoreChannel

func NewStoreChannel(result store.StoreResult) store.StoreChannel

NewStoreChannel returns a channel that will receive the given result.

func PostgreSQLSettings

func PostgreSQLSettings() *model.SqlSettings

PostgresSQLSettings returns the database settings to connect to the PostgreSQL unittesting database. The database name is generated randomly and must be created before use.

func TestAuditStore

func TestAuditStore(t *testing.T, ss store.Store)

func TestBotStore

func TestBotStore(t *testing.T, ss store.Store)

func TestChannelMemberHistoryStore

func TestChannelMemberHistoryStore(t *testing.T, ss store.Store)

func TestChannelStore

func TestChannelStore(t *testing.T, ss store.Store, s SqlSupplier)

func TestClusterDiscoveryStore

func TestClusterDiscoveryStore(t *testing.T, ss store.Store)

func TestCommandStore

func TestCommandStore(t *testing.T, ss store.Store)

func TestCommandWebhookStore

func TestCommandWebhookStore(t *testing.T, ss store.Store)

func TestComplianceStore

func TestComplianceStore(t *testing.T, ss store.Store)

func TestEmojiStore

func TestEmojiStore(t *testing.T, ss store.Store)

func TestFileInfoStore

func TestFileInfoStore(t *testing.T, ss store.Store)

func TestGroupStore

func TestGroupStore(t *testing.T, ss store.Store)

func TestJobStore

func TestJobStore(t *testing.T, ss store.Store)

func TestLicenseStore

func TestLicenseStore(t *testing.T, ss store.Store)

func TestLinkMetadataStore

func TestLinkMetadataStore(t *testing.T, ss store.Store)

func TestOAuthStore

func TestOAuthStore(t *testing.T, ss store.Store)

func TestPluginStore

func TestPluginStore(t *testing.T, ss store.Store)

func TestPostStore

func TestPostStore(t *testing.T, ss store.Store, s SqlSupplier)

func TestPreferenceStore

func TestPreferenceStore(t *testing.T, ss store.Store)

func TestReactionStore

func TestReactionStore(t *testing.T, ss store.Store)

func TestRoleStore

func TestRoleStore(t *testing.T, ss store.Store)

func TestSchemeStore

func TestSchemeStore(t *testing.T, ss store.Store)

func TestSessionStore

func TestSessionStore(t *testing.T, ss store.Store)

func TestStatusStore

func TestStatusStore(t *testing.T, ss store.Store)

func TestSystemStore

func TestSystemStore(t *testing.T, ss store.Store)

func TestTeamStore

func TestTeamStore(t *testing.T, ss store.Store)

func TestTermsOfServiceStore

func TestTermsOfServiceStore(t *testing.T, ss store.Store)

func TestUserAccessTokenStore

func TestUserAccessTokenStore(t *testing.T, ss store.Store)

func TestUserStore

func TestUserStore(t *testing.T, ss store.Store)

func TestUserTermsOfServiceStore

func TestUserTermsOfServiceStore(t *testing.T, ss store.Store)

func TestWebhookStore

func TestWebhookStore(t *testing.T, ss store.Store)

Types

type ByChannelDisplayName

type ByChannelDisplayName model.ChannelList

func (ByChannelDisplayName) Len

func (s ByChannelDisplayName) Len() int

func (ByChannelDisplayName) Less

func (s ByChannelDisplayName) Less(i, j int) bool

func (ByChannelDisplayName) Swap

func (s ByChannelDisplayName) Swap(i, j int)

type ByUserId

type ByUserId []*model.Status

func (ByUserId) Len

func (s ByUserId) Len() int

func (ByUserId) Less

func (s ByUserId) Less(i, j int) bool

func (ByUserId) Swap

func (s ByUserId) Swap(i, j int)

type SqlSupplier

type SqlSupplier interface {
	GetMaster() *gorp.DbMap
}

type Store

type Store struct {
	TeamStore                 mocks.TeamStore
	ChannelStore              mocks.ChannelStore
	PostStore                 mocks.PostStore
	UserStore                 mocks.UserStore
	BotStore                  mocks.BotStore
	AuditStore                mocks.AuditStore
	ClusterDiscoveryStore     mocks.ClusterDiscoveryStore
	ComplianceStore           mocks.ComplianceStore
	SessionStore              mocks.SessionStore
	OAuthStore                mocks.OAuthStore
	SystemStore               mocks.SystemStore
	WebhookStore              mocks.WebhookStore
	CommandStore              mocks.CommandStore
	CommandWebhookStore       mocks.CommandWebhookStore
	PreferenceStore           mocks.PreferenceStore
	LicenseStore              mocks.LicenseStore
	TokenStore                mocks.TokenStore
	EmojiStore                mocks.EmojiStore
	StatusStore               mocks.StatusStore
	FileInfoStore             mocks.FileInfoStore
	ReactionStore             mocks.ReactionStore
	JobStore                  mocks.JobStore
	UserAccessTokenStore      mocks.UserAccessTokenStore
	PluginStore               mocks.PluginStore
	ChannelMemberHistoryStore mocks.ChannelMemberHistoryStore
	RoleStore                 mocks.RoleStore
	SchemeStore               mocks.SchemeStore
	TermsOfServiceStore       mocks.TermsOfServiceStore
	GroupStore                mocks.GroupStore
	UserTermsOfServiceStore   mocks.UserTermsOfServiceStore
	LinkMetadataStore         mocks.LinkMetadataStore
}

Store can be used to provide mock stores for testing.

func (*Store) AssertExpectations

func (s *Store) AssertExpectations(t mock.TestingT) bool

func (*Store) Audit

func (s *Store) Audit() store.AuditStore

func (*Store) Bot

func (s *Store) Bot() store.BotStore

func (*Store) Channel

func (s *Store) Channel() store.ChannelStore

func (*Store) ChannelMemberHistory

func (s *Store) ChannelMemberHistory() store.ChannelMemberHistoryStore

func (*Store) Close

func (s *Store) Close()

func (*Store) ClusterDiscovery

func (s *Store) ClusterDiscovery() store.ClusterDiscoveryStore

func (*Store) Command

func (s *Store) Command() store.CommandStore

func (*Store) CommandWebhook

func (s *Store) CommandWebhook() store.CommandWebhookStore

func (*Store) Compliance

func (s *Store) Compliance() store.ComplianceStore

func (*Store) DropAllTables

func (s *Store) DropAllTables()

func (*Store) Emoji

func (s *Store) Emoji() store.EmojiStore

func (*Store) FileInfo

func (s *Store) FileInfo() store.FileInfoStore

func (*Store) Group

func (s *Store) Group() store.GroupStore

func (*Store) Job

func (s *Store) Job() store.JobStore

func (*Store) License

func (s *Store) License() store.LicenseStore

func (*Store) LinkMetadata

func (s *Store) LinkMetadata() store.LinkMetadataStore

func (*Store) LockToMaster

func (s *Store) LockToMaster()

func (*Store) MarkSystemRanUnitTests

func (s *Store) MarkSystemRanUnitTests()

func (*Store) OAuth

func (s *Store) OAuth() store.OAuthStore

func (*Store) Plugin

func (s *Store) Plugin() store.PluginStore

func (*Store) Post

func (s *Store) Post() store.PostStore

func (*Store) Preference

func (s *Store) Preference() store.PreferenceStore

func (*Store) Reaction

func (s *Store) Reaction() store.ReactionStore

func (*Store) Role

func (s *Store) Role() store.RoleStore

func (*Store) Scheme

func (s *Store) Scheme() store.SchemeStore

func (*Store) Session

func (s *Store) Session() store.SessionStore

func (*Store) Status

func (s *Store) Status() store.StatusStore

func (*Store) System

func (s *Store) System() store.SystemStore

func (*Store) Team

func (s *Store) Team() store.TeamStore

func (*Store) TermsOfService

func (s *Store) TermsOfService() store.TermsOfServiceStore

func (*Store) Token

func (s *Store) Token() store.TokenStore

func (*Store) TotalMasterDbConnections

func (s *Store) TotalMasterDbConnections() int

func (*Store) TotalReadDbConnections

func (s *Store) TotalReadDbConnections() int

func (*Store) TotalSearchDbConnections

func (s *Store) TotalSearchDbConnections() int

func (*Store) UnlockFromMaster

func (s *Store) UnlockFromMaster()

func (*Store) User

func (s *Store) User() store.UserStore

func (*Store) UserAccessToken

func (s *Store) UserAccessToken() store.UserAccessTokenStore

func (*Store) UserTermsOfService

func (s *Store) UserTermsOfService() store.UserTermsOfServiceStore

func (*Store) Webhook

func (s *Store) Webhook() store.WebhookStore

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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