Skip to content

Commit

Permalink
feat(example): update example
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Jan 22, 2017
1 parent d06f6ae commit c78616b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions examples/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ source 'https://rubygems.org'

gem 'sinatra'
gem 'sinatra-contrib'
gem 'pact-provider-verifier'
13 changes: 10 additions & 3 deletions examples/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,22 @@ pipe = IO.popen("ruby api.rb")
sleep 2

puts "=> Running Pact"
# puts "=> Test FAILING Pact"
puts "=> Test FAILING Pact"
res = `pact-provider-verifier --provider-base-url http://localhost:4567 --pact-urls ./fail.json --provider_states_setup_url http://localhost:4567/provider-state --provider_states_url http://localhost:4567/provider-states`
puts res
# Test the library directly, useful during dev
# res = `ruby -I../lib ../bin/pact-provider-verifier --provider-base-url http://localhost:4567 --pact-urls ./fail.json --provider_states_setup_url http://localhost:4567/provider-state --provider_states_url http://localhost:4567/provider-states`

puts "=> Test SUCCESSFUL Pact"
res = `pact-provider-verifier --provider-base-url http://localhost:4567 --pact-urls ./me-they.json,./another-they.json --provider_states_setup_url http://localhost:4567/provider-state --provider_states_url http://localhost:4567/provider-states`
puts res

# Test the library directly, useful during dev
# res = `ruby -I../lib ../bin/pact-provider-verifier --provider-base-url http://localhost:4567 --pact-urls ./me-they.json,./another-they.json --provider_states_setup_url http://localhost:4567/provider-state --provider_states_url http://localhost:4567/provider-states`

# Test the actual gem
# Test the actual gem, useful to check a working package
# res = `../pkg/pact-provider-verifier-0.0.3-1-osx/bin/pact-provider-verifier --provider-base-url http://localhost:4567 --pact-urls ./me-they.json,./another-they.json --provider_states_setup_url http://localhost:4567/provider-state --provider_states_url http://localhost:4567/provider-states`
res = `../bin/pact-provider-verifier --provider-base-url http://localhost:4567 --broker-username pactuser --broker-password pact --pact-urls https://pact.onegeek.com.au/pacts/provider/bobby/consumer/billy/latest/sit4 --provider_states_setup_url http://localhost:4567/provider-state --provider_states_url http://localhost:4567/provider-states`
# res = `../bin/pact-provider-verifier --provider-base-url http://localhost:4567 --broker-username pactuser --broker-password pact --pact-urls https://pact.onegeek.com.au/pacts/provider/bobby/consumer/billy/latest/sit4 --provider_states_setup_url http://localhost:4567/provider-state --provider_states_url http://localhost:4567/provider-states`
code = $?

puts "=> Shutting down API"
Expand Down

0 comments on commit c78616b

Please sign in to comment.