summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-12-15 18:16:29 -0800
committerGitHub <noreply@github.com>2020-12-15 18:16:29 -0800
commit9686ef84011b4357ab706d9b38ed468ad7fc203c (patch)
tree3d2c9715bdcbb8a6b17ab5b790f812c2151f54ea
parent2f3ce1af8bbbea03f2e52505aa89ac3efa03f932 (diff)
parent917ccd168836db0a5422da835c019aaf73493d61 (diff)
downloadchef-9686ef84011b4357ab706d9b38ed468ad7fc203c.tar.gz
Merge pull request #10746 from chef/remove-old-test-script
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--spec/scripts/ssl-serve.rb47
1 files changed, 0 insertions, 47 deletions
diff --git a/spec/scripts/ssl-serve.rb b/spec/scripts/ssl-serve.rb
deleted file mode 100644
index b03fe4af42..0000000000
--- a/spec/scripts/ssl-serve.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-# ssl-serve.rb
-# USAGE: ruby ssl-serve.rb
-#
-# ssl-serve is a script that serves a local directory over SSL.
-# You can use it to test various HTTP behaviors in chef, like chef-client's
-# `-j` and `-c` options and remote_file with https connections.
-#
-require "pp"
-require "openssl"
-require "webrick"
-require "webrick/https"
-
-$ssl = true
-
-CHEF_SPEC_DATA = File.expand_path("../data", __dir__)
-cert_text = File.read(File.expand_path("ssl/chef-rspec.cert", CHEF_SPEC_DATA))
-cert = OpenSSL::X509::Certificate.new(cert_text)
-key_text = File.read(File.expand_path("ssl/chef-rspec.key", CHEF_SPEC_DATA))
-key = OpenSSL::PKey::RSA.new(key_text)
-
-server_opts = {}
-if $ssl
- server_opts.merge!( { SSLEnable: true,
- SSLVerifyClient: OpenSSL::SSL::VERIFY_NONE,
- SSLCertificate: cert,
- SSLPrivateKey: key })
-end
-
-# 5 == debug, 3 == warning
-LOGGER = WEBrick::Log.new(STDOUT, 5)
-DEFAULT_OPTIONS = {
- server: "webrick",
- Port: 9000,
- Host: "localhost",
- environment: :none,
- Logger: LOGGER,
- DocumentRoot: File.expand_path("#{Dir.tmpdir}/chef-118-sampledata"),
- #:AccessLog => [] # Remove this option to enable the access log when debugging.
-}.freeze
-
-webrick_opts = DEFAULT_OPTIONS.merge(server_opts)
-pp webrick_opts: webrick_opts
-
-server = WEBrick::HTTPServer.new(webrick_opts)
-trap("INT") { server.shutdown }
-
-server.start