Sha256: e31ee7d1adbf20b33ac7493121dc221087f52cf05e0c3127a613fee8ade0380f

Contents?: true

Size: 677 Bytes

Versions: 4

Compression:

Stored size: 677 Bytes

Contents

# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2016-2023, by Samuel Williams.

require 'website'
require 'benchmark/http'

describe "website" do
	include_context AServer
	
	let(:timeout) {10}
	let(:spider) {Benchmark::HTTP::Spider.new(depth: 128)}
	let(:statistics) {Benchmark::HTTP::Statistics.new}
	
	it "should be responsive" do
		spider.fetch(statistics, client, endpoint.url) do |method, uri, response|
			if response.failure?
				Console.logger.error(endpoint) {"#{method} #{uri} -> #{response.status}"}
			end
		end.wait
		
		statistics.print
		
		expect(statistics.samples).to be(:any?)
		expect(statistics.failed).to be(:zero?)
	end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
utopia-2.23.0 setup/site/test/website.rb
utopia-2.22.2 setup/site/test/website.rb
utopia-2.22.1 setup/site/test/website.rb
utopia-2.22.0 setup/site/test/website.rb