-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- require taskkill to ensure processes are killed when running test suite locally - required binstub for cmd prompt, if ran from powershell or cmd prompt for prev skipped tests
- Loading branch information
Showing
12 changed files
with
83 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
require 'support/provider_with_self_signed_cert' | ||
require 'find_a_port' | ||
|
||
describe "verifying a provider that uses a self signed certificate", skip_windows: true do | ||
describe "verifying a provider that uses a self signed certificate" do | ||
|
||
before(:all) do | ||
@port = FindAPort.available_port | ||
@pipe = IO.popen({}, %W{ruby spec/support/provider_with_self_signed_cert.rb #{@port}}) | ||
sleep 2 | ||
end | ||
it "passes because it has SSL verification turned off" do | ||
begin | ||
@port = FindAPort.available_port | ||
@ssl_server_pid = fork do | ||
run_provider_with_self_signed_cert @port | ||
end | ||
sleep 2 | ||
subject = `bundle exec bin/pact-provider-verifier ./test/me-they.json -a 1.0.0 --provider-base-url https://localhost:#{@port} --provider_states_setup_url https://localhost:#{@port}/provider-state -v` | ||
expect(subject).to include "2 interactions, 0 failures" | ||
ensure | ||
Process.kill('KILL', @ssl_server_pid) | ||
subject = `bundle exec bin/pact-provider-verifier ./test/me-they.json -a 1.0.0 --provider-base-url https://localhost:#{@port} --provider_states_setup_url https://localhost:#{@port}/provider-state -v` | ||
expect(subject).to include "2 interactions, 0 failures" | ||
end | ||
after(:all) do | ||
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/ | ||
system("taskkill /im #{@pipe.pid} /f /t >nul 2>&1") | ||
else | ||
Process.kill 'KILL', @pipe.pid | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters