mocks

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Keycloak

func Keycloak(ctx context.Context, wg *sync.WaitGroup) (url string)

Types

type CamundaMock

type CamundaMock struct {
	Queue chan []model.CamundaExternalTask
	// contains filtered or unexported fields
}

func NewCamundaMock

func NewCamundaMock() *CamundaMock

func (*CamundaMock) AddFileToQueue

func (this *CamundaMock) AddFileToQueue(location string) error

func (*CamundaMock) AddToQueue

func (this *CamundaMock) AddToQueue(fetchResult []model.CamundaExternalTask)

func (*CamundaMock) Fetch

func (this *CamundaMock) Fetch() (result []model.CamundaExternalTask)

func (*CamundaMock) PopRequestLog

func (this *CamundaMock) PopRequestLog() []Request

func (*CamundaMock) Start

func (this *CamundaMock) Start(ctx context.Context, wg *sync.WaitGroup) (url string)

type HttpService

type HttpService struct {
	ResponseIndex map[string]map[string]int        //method -> path = request-count
	Response      map[string]map[string][]Response //method -> path -> request-count = response
	// contains filtered or unexported fields
}

func (*HttpService) CheckExpectedRequests

func (this *HttpService) CheckExpectedRequests(expectedRequests []Request) error

func (*HttpService) CheckExpectedRequestsFromFileLocation

func (this *HttpService) CheckExpectedRequestsFromFileLocation(fileLocation string) error

func (*HttpService) GetRequestLog

func (this *HttpService) GetRequestLog() []Request

func (*HttpService) PopRequestLog

func (this *HttpService) PopRequestLog() []Request

func (*HttpService) SetResponse

func (this *HttpService) SetResponse(method string, path string, responses []Response)

func (*HttpService) SetResponses

func (this *HttpService) SetResponses(responsesMap map[string]map[string][]Response)

func (*HttpService) SetResponsesFromFile

func (this *HttpService) SetResponsesFromFile(fileLocation string) error

func (*HttpService) Start

func (this *HttpService) Start(ctx context.Context, wg *sync.WaitGroup) (url string)

type Request

type Request struct {
	Method   string `json:"method"`
	Endpoint string `json:"endpoint"`
	Message  string `json:"message"`
}

type Response

type Response struct {
	StatusCode int    `json:"status_code"`
	Message    string `json:"message"`
}

type SmartServiceRepoMock

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

func NewSmartServiceRepoMock

func NewSmartServiceRepoMock(libConfig configuration.Config, config worker.Config, moduleListResponse []byte) *SmartServiceRepoMock

func (*SmartServiceRepoMock) CheckExpectedRequests

func (this *SmartServiceRepoMock) CheckExpectedRequests(expectedRequests []Request) error

func (*SmartServiceRepoMock) CheckExpectedRequestsFromFileLocation

func (this *SmartServiceRepoMock) CheckExpectedRequestsFromFileLocation(fileLocation string) error

func (*SmartServiceRepoMock) GetRequestLog

func (this *SmartServiceRepoMock) GetRequestLog() []Request

func (*SmartServiceRepoMock) PopRequestLog

func (this *SmartServiceRepoMock) PopRequestLog() []Request

func (*SmartServiceRepoMock) Start

func (this *SmartServiceRepoMock) Start(ctx context.Context, wg *sync.WaitGroup) (url string)

Jump to

Keyboard shortcuts

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