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

Fixes #212: ensure pact path is consistent #213

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

solarmosaic-kflorence
Copy link
Contributor

See #212 -- it seems that when given a new File(relativePath), file.createNewFile() will create a file in a different place for SBT sub-projects and root-projects. Using new File(absolutePath) instead resolves this issue.

I'm not sure the best way to add test coverage for this, but it can be reproduced by:

  • creating an SBT project that has a sub-project and a root project both with .enablePlugins(ScalaPactPlugin).
  • creating a consumer pact in both projects and and running tests against them (sbt pactTest, assuming you .aggregate the sub-project in the root project)
  • you should see pact files get generated in the root target/pacts folder, as well as in subProject/target/pacts prior to this fix, and after this fix they should both be in the root target/pacts folder.

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

Successfully merging this pull request may close these issues.

1 participant