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

Unable to configure pact to output logs to a directory #232

Closed
smucode opened this issue Oct 17, 2018 · 2 comments
Closed

Unable to configure pact to output logs to a directory #232

smucode opened this issue Oct 17, 2018 · 2 comments

Comments

@smucode
Copy link

smucode commented Oct 17, 2018

Setting log to a directory doesn't work. Setting log to a file works, but it's overwritten for each consumer test.

Software versions

  • Mac OSX 10.14
  • pact-node@6.19.11
  • pact@7.0.1
  • Node v10.9.0

Expected behaviour

Logs to be written to the directory as described in the readme: log: Directory to log to

Actual behaviour

Pact Binary Error: /path/node_modules/@pact-foundation/pact-node/standalone/darwin-1.54.4/lib/vendor/ruby/2.2.0/gems/pact-mock_service-2.10.1/lib/pact/mock_service/run.rb:72:in initialize': Is a directory @ rb_sysopen - /path/api-consumer/logs (Errno::EISDIR)`

Steps to reproduce

new Pact({
  consumer: 'consumer',
  provider: 'provider',
  providerPort,
  log: path.resolve(process.cwd(), 'test/api-consumer/logs'), // points to a folder
  dir: path.resolve(process.cwd(), 'test/pacts'),
  logLevel: 'WARN',
  spec: 2,
  pactfileWriteMode: 'update'
})
@bethesque
Copy link
Member

The docs need to be updated. It should point to a file. https://github.com/pact-foundation/pact-ruby-standalone/releases#pact-mock-service

@mefellows
Copy link
Member

@smucode this is the intended behaviour. I've fixed the docs there, apologies for the confusion (the examples should all show the correct use of that flag).

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

3 participants