Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBQuery ¶
type DBQuery struct {
Query map[string]string `yaml:"query"`
Params string `yaml:"params"`
Text string `yaml:"text"`
}
DBQuery represents a single db query to be executed. The Query, its Params and the name of the test (Text) it should be associated with
type DBRequest ¶
type DBRequest struct {
Body string `yaml:"body"`
Text string `yaml:"text"`
Success bool `yaml:"success"`
}
DBRequest represents a single integration test consisting of the input Body, the test name (Text) and whether the test is expected to succeed or fail (Success)
type DBTranslatorRequests ¶
DBTranslatorRequests hold all integration test by ID, which will be used in error cases for better identify single failing tests
type DBTranslatorResponses ¶
DBTranslatorResponses hold all database queries used in the tests The query ID will be used in error cases for better identify single failing tests
type MockedDatastoreExecutor ¶ added in v0.2.0
MockedDatastoreExecutor is a data.DatastoreExecutor implementation, which gets database queries to expect and asserts incoming queries match the pre-defined ones
func NewMockedDatastoreExecuter ¶
func NewMockedDatastoreExecuter(t *testing.T, dbQueriesPath, testName string) *MockedDatastoreExecutor
NewMockedDatastoreExecuter creates a new mocking executer
func (*MockedDatastoreExecutor) Configure ¶ added in v0.2.0
func (m *MockedDatastoreExecutor) Configure(appConf *configs.AppConfig, alias string) error
Configure - see data.DatastoreExecutor
func (*MockedDatastoreExecutor) Execute ¶ added in v0.2.0
func (m *MockedDatastoreExecutor) Execute(_ context.Context, query data.DatastoreQuery) (bool, error)
Execute - see data.DatastoreExecutor