Sha256: bfe1070e36ab09c35f463cc27220a407d92beb4e43e7182bfbbe3adf350189a0

Contents?: true

Size: 755 Bytes

Versions: 11

Compression:

Stored size: 755 Bytes

Contents

require 'webrick'
require File.dirname(__FILE__) + '/../lib/yawast'
require File.dirname(__FILE__) + '/base'

class TestScannerApacheServerStatus < Minitest::Test
  include TestBase

  def test_server_status_present
    port = rand(60000) + 1024 # pick a random port number
    server = start_web_server File.dirname(__FILE__) + '/data/apache_server_status.txt', 'server-status', port

    override_stdout
    uri = Yawast::Commands::Utils.extract_uri(["http://localhost:#{port}"])

    Yawast::Shared::Http.setup nil, nil
    Yawast::Scanner::Plugins::Servers::Apache.check_server_status uri

    assert stdout_value.include?('Apache Server Status page found'), 'Apache Server Status page warning not found'

    server.exit
    restore_stdout
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
yawast-0.7.2 test/test_scan_apache_server_status.rb
yawast-0.7.1 test/test_scan_apache_server_status.rb
yawast-0.7.0 test/test_scan_apache_server_status.rb
yawast-0.7.0.beta3 test/test_scan_apache_server_status.rb
yawast-0.7.0.beta2 test/test_scan_apache_server_status.rb
yawast-0.7.0.beta1 test/test_scan_apache_server_status.rb
yawast-0.6.0 test/test_scan_apache_server_status.rb
yawast-0.6.0.beta6 test/test_scan_apache_server_status.rb
yawast-0.6.0.beta5 test/test_scan_apache_server_status.rb
yawast-0.6.0.beta4 test/test_scan_apache_server_status.rb
yawast-0.6.0.beta3 test/test_scan_apache_server_status.rb