Commit 78a992ef authored by anonym's avatar anonym
Browse files

Test suite: adapt for Tails Installer 4.20.

Refs: #8859, #8860
parent f66c17af
......@@ -87,12 +87,9 @@ def tails_installer_match_status(pattern)
@installer.child('', roleName: 'text').text[pattern]
end
class UpgradeNotSupported < StandardError
end
When /^I start Tails Installer$/ do
step 'I run "export DEBUG=1 ; /usr/bin/tails-installer-launcher" in GNOME Terminal'
@installer = Dogtail::Application.new('tails-installer-launcher')
step 'I run "export DEBUG=1 ; /usr/bin/tails-installer" in GNOME Terminal'
@installer = Dogtail::Application.new('tails-installer')
@installer.child('Tails Installer', roleName: 'frame')
# Sometimes Dogtail will find the Installer and click its window
# before it is shown (searchShowingOnly is not perfect) which
......@@ -109,14 +106,6 @@ When /^I am told that the destination device (.*)$/ do |status|
end
end
When /^I am suggested to do a "Install by cloning"$/ do
try_for(10) do
tails_installer_match_status(
/You should instead use "Install by cloning" to upgrade Tails/
)
end
end
Then /^a suitable USB device is (?:still )?not found$/ do
@installer.child(
'No device suitable to install Tails could be found', roleName: 'label'
......@@ -135,9 +124,6 @@ end
When /^I (install|upgrade) Tails (?:to|on) USB drive "([^"]+)" (by cloning|from an ISO)$/ do |action, name, source|
step "I start Tails Installer"
if tails_installer_match_status(/It is impossible to upgrade the device .+ #{$vm.disk_dev(name)}\d* /)
raise UpgradeNotSupported
end
assert(tails_installer_is_device_selected?(name))
if source == 'from an ISO'
iso_radio = @installer.child('Use a downloaded Tails ISO image',
......@@ -166,16 +152,6 @@ When /^I (install|upgrade) Tails (?:to|on) USB drive "([^"]+)" (by cloning|from
end
end
When /^I fail to (.*)$/ do |step|
begin
step "I #{step}"
rescue UpgradeNotSupported
# this is what we expect
else
raise "The USB installer should not succeed"
end
end
Given /^I plug and mount a USB drive containing the Tails ISO$/ do
iso_dir = share_host_files(TAILS_ISO)
@iso_path = "#{iso_dir}/#{File.basename(TAILS_ISO)}"
......
......@@ -90,9 +90,6 @@ Feature: Installing Tails to a USB drive
Then Tails is running from USB drive "isohybrid"
When I shutdown Tails and wait for the computer to power off
And I start Tails from DVD with network unplugged and I login
And I fail to upgrade Tails on USB drive "isohybrid" by cloning
Then I am suggested to do a "Install by cloning"
When I kill the process "tails-installer"
And I install Tails to USB drive "isohybrid" by cloning
Then the running Tails is installed on USB drive "isohybrid"
But there is no persistence partition on USB drive "isohybrid"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment