diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2015-11-25 12:40:14 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-11-25 12:40:14 -0800 |
commit | 79c7ad25e08b6fdee6df967d9e294ba8c802d4ba (patch) | |
tree | 99fb0434386b3bc47e0788710a72027c02e7111b /spec/unit | |
parent | 3f5bbc8516073d6af7b6d2aa9b46bc09af57c880 (diff) | |
download | chef-79c7ad25e08b6fdee6df967d9e294ba8c802d4ba.tar.gz |
restore the old signal handler here
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/knife/ssl_check_spec.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/unit/knife/ssl_check_spec.rb b/spec/unit/knife/ssl_check_spec.rb index fd46c47d99..a9d1145f34 100644 --- a/spec/unit/knife/ssl_check_spec.rb +++ b/spec/unit/knife/ssl_check_spec.rb @@ -181,7 +181,7 @@ E let(:self_signed_crt) { OpenSSL::X509::Certificate.new(File.read(self_signed_crt_path)) } before do - trap(:INT, "DEFAULT") + @old_signal = trap(:INT, "DEFAULT") expect(TCPSocket).to receive(:new). with("foo.example.com", 8443). @@ -191,6 +191,10 @@ E and_return(ssl_socket_for_debug) end + after do + trap(:INT, @old_signal) + end + context "when the certificate's CN does not match the hostname" do before do expect(ssl_check).to receive(:verify_X509).and_return(true) # X509 valid certs |