Merge branch 'dev' into 'staging'
feat: mock logs See merge request external/treasurer!14
This commit is contained in:
commit
a5c6844e5d
@ -17,12 +17,12 @@ services:
|
||||
- GRPC_PORT=9085
|
||||
|
||||
- IS_MOCK=true
|
||||
- MOCK_SERVICE_HOST=http://treasurer-mock:8080
|
||||
- MOCK_SERVICE_HOST=http://treasurer-mock-service:8080
|
||||
|
||||
- YOOMONEY_STORE_ID=id
|
||||
- YOOMONEY_SECRET_KEY=secret
|
||||
- YOOMONEY_WEBHOOKS_URL=http://treasurer-mock:8080/webhooks
|
||||
- YOOMONEY_PAYMENTS_URL=http://treasurer-mock:8080/payments
|
||||
- YOOMONEY_WEBHOOKS_URL=http://treasurer-mock-service:8080/webhooks
|
||||
- YOOMONEY_PAYMENTS_URL=http://treasurer-mock-service:8080/payments
|
||||
|
||||
- MONGO_HOST=mongo
|
||||
- MONGO_PORT=27017
|
||||
@ -39,6 +39,7 @@ services:
|
||||
- treasurer-mock
|
||||
|
||||
treasurer-mock:
|
||||
hostname: treasurer-mock-service
|
||||
container_name: treasurermock-container
|
||||
image: 'wiremock/wiremock:2.35.0'
|
||||
ports:
|
||||
|
@ -92,13 +92,23 @@ func (receiver *YoomoneyMockService) RegisterPayments(host string) errors.Error
|
||||
AtPriority(1)
|
||||
|
||||
if err := mockClient.StubFor(rule); err != nil {
|
||||
receiver.logger.Error("failed to init payment mock handler on <RegisterPayment> of <YoomoneyMockService>", zap.Error(err))
|
||||
receiver.logger.Error("failed to init payment mock handler on <RegisterPayment> of <YoomoneyMockService>",
|
||||
zap.Error(err),
|
||||
zap.String("payments full url", receiver.yoomoneyURL.Payments),
|
||||
zap.String("payments path", paymentsURL.Path),
|
||||
)
|
||||
|
||||
return errors.NewWithError(fmt.Errorf("failed to init payment mock handler: %w", err), errors.ErrInternalError)
|
||||
}
|
||||
|
||||
isVerified, err := mockClient.Verify(wiremock.NewRequest("post", wiremock.URLPathEqualTo(paymentsURL.Path)), 0)
|
||||
if err != nil {
|
||||
receiver.logger.Error("failed to verify payment mock handler on <RegisterPayment> of <YoomoneyMockService>", zap.Error(err))
|
||||
receiver.logger.Error("failed to verify payment mock handler on <RegisterPayment> of <YoomoneyMockService>",
|
||||
zap.Error(err),
|
||||
zap.String("payments full url", receiver.yoomoneyURL.Payments),
|
||||
zap.String("payments path", paymentsURL.Path),
|
||||
)
|
||||
|
||||
return errors.NewWithError(fmt.Errorf("failed to verify payment mock handler: %w", err), errors.ErrInternalError)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user