-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
enhancementNew feature or requestNew feature or request
Description
🗣 Context
Currently the only way to display some logging is by setting an environment variable. It would be good to have the logs of interactions with the mock server written in a file.
💬 Narrative
When running pact tests
I want to have logs written into a file
So that I can debug locally and on CI much easier
📝 Notes
PactSwiftMockServer
exposes a pactffi
method that tells pactffi_mock_server
to write the log buffer into a file.
🏗 Design
- Exposes the interface ie
MockService.init(log: URL? = nil)
- Passes do write the log signal to
PactSwiftMockServer
package and intopactffi
. - Uses the same base default directory for contract if no override provided (eg:
/tmp/pacts/logs
)
✅ Acceptance Criteria
GIVEN a valid URL
to a log file is provided at MockService.init
WHEN pact tests finish
THEN a log file is generated at provided URL
GIVEN MockService
is instantiated without an URL to a log file
WHEN pact tests finish
THEN a log file is generated at defaultPactsDir/logs
🚫 Out of Scope
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request