Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fail-fast on missing --pact_dir parameter #28

Open
timoreimann opened this issue Sep 14, 2015 · 2 comments
Open

fail-fast on missing --pact_dir parameter #28

timoreimann opened this issue Sep 14, 2015 · 2 comments

Comments

@timoreimann
Copy link

If one does not pass the --pact_dir parameter the mock service, it only fails when the first interaction has succeeded, i.e., when the service wants to persist the generated Pact file.

IMHO, the service should already check whether the parameter has been passed on startup so that users receive an indication early enough. This is especially important in high-volume CI environments where extensive test suites should not even need to start if the mock service hasn't started successfully.

@timoreimann timoreimann changed the title fail-fast on missing --pact_dir parameter fail-fast on missing --pact_dir parameter Sep 14, 2015
@bethesque
Copy link
Member

The reason it's a late failure is that in the original code, the pact directory was sent through with the request, not at startup, so it was not possible to fail until that first request had come though. I'm pretty sure we can change it now, as I expect the older versions of that code are not in use. I would give it a default directory (probably "./pacts") rather than making it mandatory however.

@timoreimann
Copy link
Author

Default directory sounds good. It'd even allow old versions to transition to new ones smoothly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants