integration

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

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

type DBTranslatorRequests struct {
	Requests map[string]DBRequest
}

DBTranslatorRequests hold all integration test by ID, which will be used in error cases for better identify single failing tests

type DBTranslatorResponses

type DBTranslatorResponses struct {
	Queries map[string]DBQuery
}

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

type MockedDatastoreExecutor struct {
	mock.Mock
	// contains filtered or unexported fields
}

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

Execute - see data.DatastoreExecutor

Jump to

Keyboard shortcuts

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