[functional tests] upgrade to Ruby 2.4.1

This commit is contained in:
Joe Thornber 2017-07-28 10:38:36 +01:00
parent 0a06e4b21b
commit 53e3d5f962
5 changed files with 53 additions and 36 deletions

View File

@ -1 +1 @@
1.9.3
2.4.1

View File

@ -1,7 +1,7 @@
source 'https://rubygems.org'
group :test do
gem 'cucumber'
gem 'cucumber', '~> 2.4.0'
gem 'aruba'
gem 'thinp_xml'
gem 'thinp_xml', :path => "/home/ejt/work/RedHat/thinp_xml"
end

View File

@ -1,37 +1,53 @@
PATH
remote: /home/ejt/work/RedHat/thinp_xml
specs:
thinp_xml (0.0.22)
ejt_command_line (>= 0.0.2)
GEM
remote: https://rubygems.org/
specs:
aruba (0.6.1)
childprocess (>= 0.3.6)
cucumber (>= 1.1.1)
rspec-expectations (>= 2.7.0)
builder (3.2.2)
childprocess (0.5.3)
aruba (0.14.2)
childprocess (~> 0.5.6)
contracts (~> 0.9)
cucumber (>= 1.3.19)
ffi (~> 1.9.10)
rspec-expectations (>= 2.99)
thor (~> 0.19)
builder (3.2.3)
childprocess (0.5.9)
ffi (~> 1.0, >= 1.0.11)
cucumber (1.3.16)
contracts (0.16.0)
cucumber (2.4.0)
builder (>= 2.1.2)
cucumber-core (~> 1.5.0)
cucumber-wire (~> 0.0.1)
diff-lcs (>= 1.1.3)
gherkin (~> 2.12)
gherkin (~> 4.0)
multi_json (>= 1.7.5, < 2.0)
multi_test (>= 0.1.1)
diff-lcs (1.2.5)
multi_test (>= 0.1.2)
cucumber-core (1.5.0)
gherkin (~> 4.0)
cucumber-wire (0.0.1)
diff-lcs (1.3)
ejt_command_line (0.0.4)
ffi (1.9.3)
gherkin (2.12.2)
multi_json (~> 1.3)
multi_json (1.10.1)
multi_test (0.1.1)
rspec-expectations (3.0.4)
ffi (1.9.18)
gherkin (4.1.3)
multi_json (1.12.1)
multi_test (0.1.2)
rspec-expectations (3.6.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.0.0)
rspec-support (3.0.4)
thinp_xml (0.0.20)
ejt_command_line (>= 0.0.2)
rspec-support (~> 3.6.0)
rspec-support (3.6.0)
thor (0.19.4)
PLATFORMS
ruby
DEPENDENCIES
aruba
cucumber
thinp_xml
cucumber (~> 2.4.0)
thinp_xml!
BUNDLED WITH
1.15.3

View File

@ -7,7 +7,7 @@ end
Given /^input without read permissions$/ do
write_file(DEFAULT_INPUT, "\0" * 4096)
in_current_dir do
cd(".") do
f = File.new(DEFAULT_INPUT)
f.chmod(0000)
end
@ -18,7 +18,7 @@ Given(/^input file$/) do
end
Given(/^block (\d+) is zeroed$/) do |b|
in_current_dir do
cd(".") do
File.open(DEFAULT_INPUT, 'w') do |f|
f.seek(BLOCK_SIZE * b.to_i, IO::SEEK_SET)
f.write("\0" * BLOCK_SIZE)
@ -27,11 +27,11 @@ Given(/^block (\d+) is zeroed$/) do |b|
end
Then /^it should pass$/ do
assert_success(true)
expect(last_command_started).to be_successfully_executed
end
Then /^it should fail$/ do
assert_success(false)
expect(last_command_started).to_not be_successfully_executed
end
CACHE_USAGE =<<EOF
@ -44,14 +44,15 @@ Options:
{--super-block-only}
{--skip-mappings}
{--skip-hints}
{--skip-discards}
EOF
Then /^cache_usage to stdout$/ do
assert_partial_output(CACHE_USAGE, all_stdout)
expect(last_command_started).to have_output_on_stdout(CACHE_USAGE.chomp)
end
Then /^cache_usage to stderr$/ do
assert_partial_output(CACHE_USAGE, all_stderr)
expect(last_command_started).to have_output_on_stderr("No input file provided.\n" + CACHE_USAGE.chomp)
end
When(/^I run cache_check with (.*?)$/) do |opts|
@ -79,7 +80,7 @@ When(/^I run cache_metadata_size$/) do
end
Given(/^valid cache metadata$/) do
in_current_dir do
cd(".") do
system("cache_xml create --nr-cache-blocks uniform[1000..5000] --nr-mappings uniform[500..1000] > #{xml_file}")
system("dd if=/dev/zero of=#{dev_file} bs=4k count=1024 > /dev/null")
end
@ -92,7 +93,7 @@ Then(/^cache dumps (\d+) and (\d+) should be identical$/) do |d1, d2|
end
Given(/^a small xml file$/) do
in_current_dir do
cd(".") do
system("cache_xml create --nr-cache-blocks 3 --nr-mappings 3 --layout linear --dirty-percent 100 > #{xml_file}")
end
end

View File

@ -42,13 +42,13 @@ When(/^I run thin_restore with (.*?)$/) do |opts|
end
Then /^it should give no output$/ do
ps = only_processes.last
ps = all_commands.last
output = ps.stdout + ps.stderr
output.should == ""
expect(output).to eq("")
end
Then(/^it should pass with version$/) do
only_processes.last.stdout.chomp.should == tools_version
expect(all_commands.last.stdout.chomp).to eq(tools_version)
end
When(/^I dump$/) do