Commit e23f1de7 authored by anonym's avatar anonym
Browse files

Also use a default persistence password instead of step parameter.

parent e007af34
......@@ -13,7 +13,7 @@ Feature: Electrum Bitcoin client
Scenario: Using a persistent Electrum configuration
Given Tails has booted without network from a USB drive with a persistent partition and stopped at Tails Greeter's login screen
And the network is plugged
When I enable persistence with password "asdf"
When I enable persistence
And I log in to a new session
And Tor is ready
And available upgrades have been checked
......@@ -26,7 +26,7 @@ Feature: Electrum Bitcoin client
Then a bitcoin wallet is present
And I see the main Electrum client window
And I shutdown Tails and wait for the computer to power off
And I start Tails from USB drive "current" and I login with persistence password "asdf"
And I start Tails from USB drive "current" and I login with persistence enabled
When I start Electrum through the GNOME menu
And a bitcoin wallet is present
And I see the main Electrum client window
......
......@@ -25,7 +25,7 @@ Feature: Using Evince
Scenario: I can view and print a PDF file stored in persistent /home/amnesia/Persistent but not /home/amnesia/.gnupg
Given Tails has booted without network from a USB drive with a persistent partition and stopped at Tails Greeter's login screen
When I enable persistence with password "asdf"
When I enable persistence
And I log in to a new session
And the Tails desktop is ready
And I copy "/usr/share/cups/data/default-testpage.pdf" to "/home/amnesia/Persistent" as user "amnesia"
......@@ -33,7 +33,7 @@ Feature: Using Evince
And I copy "/usr/share/cups/data/default-testpage.pdf" to "/home/amnesia/.gnupg" as user "amnesia"
Then the file "/home/amnesia/.gnupg/default-testpage.pdf" exists
And I shutdown Tails and wait for the computer to power off
And I start Tails from USB drive "current" with network unplugged and I login with persistence password "asdf"
And I start Tails from USB drive "current" with network unplugged and I login with persistence enabled
When I open "/home/amnesia/Persistent/default-testpage.pdf" with Evince
Then I see "CupsTestPage.png" after at most 10 seconds
And I can print the current document to "/home/amnesia/Persistent/output.pdf"
......
......@@ -9,11 +9,11 @@ Feature: Tails persistence
Then Tails seems to have booted normally
And Tails is running from USB drive "current"
And persistence is disabled
But a Tails persistence partition with password "asdf" exists on USB drive "current"
But a Tails persistence partition exists on USB drive "current"
Scenario: Booting Tails from a USB drive with an enabled persistent partition
Given Tails has booted without network from a USB drive with a persistent partition and stopped at Tails Greeter's login screen
When I enable persistence with password "asdf"
When I enable persistence
And I log in to a new session
Then Tails seems to have booted normally
And Tails is running from USB drive "current"
......@@ -22,7 +22,7 @@ Feature: Tails persistence
Scenario: Writing files first to a read/write-enabled persistent partition, and then to a read-only-enabled persistent partition
Given Tails has booted without network from a USB drive with a persistent partition and stopped at Tails Greeter's login screen
When I enable persistence with password "asdf"
When I enable persistence
And I log in to a new session
Then Tails is running from USB drive "current"
And the boot device has safe access rights
......@@ -34,8 +34,8 @@ Feature: Tails persistence
And I take note of which persistence presets are available
And I shutdown Tails and wait for the computer to power off
# XXX: how does guestfs work vs snapshots?
Then only the expected files are present on the persistence partition encrypted with password "asdf" on USB drive "current"
Given I start Tails from USB drive "current" with network unplugged and I login with read-only persistence password "asdf"
Then only the expected files are present on the persistence partition on USB drive "current"
Given I start Tails from USB drive "current" with network unplugged and I login with read-only persistence enabled
Then Tails is running from USB drive "current"
And the boot device has safe access rights
And all persistence presets are enabled
......@@ -45,7 +45,7 @@ Feature: Tails persistence
And I take note of which persistence presets are available
And I shutdown Tails and wait for the computer to power off
# XXX: how does guestfs work vs snapshots?
Then only the expected files are present on the persistence partition encrypted with password "asdf" on USB drive "current"
Then only the expected files are present on the persistence partition on USB drive "current"
Scenario: Deleting a Tails persistent partition
Given Tails has booted without network from a USB drive with a persistent partition and stopped at Tails Greeter's login screen
......@@ -53,7 +53,7 @@ Feature: Tails persistence
Then Tails is running from USB drive "current"
And the boot device has safe access rights
And persistence is disabled
But a Tails persistence partition with password "asdf" exists on USB drive "current"
But a Tails persistence partition exists on USB drive "current"
And all notifications have disappeared
When I delete the persistent partition
Then there is no persistence partition on USB drive "current"
......
......@@ -85,7 +85,7 @@ Feature: Chatting anonymously using Pidgin
Scenario: Using a persistent Pidgin configuration
Given Tails has booted without network from a USB drive with a persistent partition and stopped at Tails Greeter's login screen
And the network is plugged
And I enable persistence with password "asdf"
And I enable persistence
And I log in to a new session
When I start Pidgin through the GNOME menu
Then I see Pidgin's account manager window
......@@ -94,7 +94,7 @@ Feature: Chatting anonymously using Pidgin
# And I take note of the OTR key for Pidgin's "irc.oftc.net" account
And I shutdown Tails and wait for the computer to power off
Given a computer
And I start Tails from USB drive "current" and I login with persistence password "asdf"
And I start Tails from USB drive "current" and I login with persistence enabled
And Pidgin has the expected persistent accounts configured
# And Pidgin has the expected persistent OTR keys
When I start Pidgin through the GNOME menu
......
......@@ -170,7 +170,7 @@ Given /^I start Tails( from DVD)?( with network unplugged)?( and I login)?$/ do
end
end
Given /^I start Tails from (.+?) drive "(.+?)"(| with network unplugged)( and I login(| with(| read-only) persistence password "([^"]+)"))?$/ do |drive_type, drive_name, network_unplugged, do_login, persistence_on, persistence_ro, persistence_pwd|
Given /^I start Tails from (.+?) drive "(.+?)"(| with network unplugged)( and I login(| with(| read-only) persistence enabled))?$/ do |drive_type, drive_name, network_unplugged, do_login, persistence_on, persistence_ro|
# we don't @skip_steps_while_restoring_background as we're only running
# other steps, that are taking care of it *if* they have to
step "the computer is set to boot from #{drive_type} drive \"#{drive_name}\""
......@@ -183,11 +183,10 @@ Given /^I start Tails from (.+?) drive "(.+?)"(| with network unplugged)( and I
step "the computer boots Tails"
if do_login
if ! persistence_on.empty?
assert(! persistence_pwd.empty?, "A password must be provided when enabling persistence")
if persistence_ro.empty?
step "I enable persistence with password \"#{persistence_pwd}\""
step "I enable persistence"
else
step "I enable read-only persistence with password \"#{persistence_pwd}\""
step "I enable read-only persistence"
end
end
step "I log in to a new session"
......@@ -276,7 +275,7 @@ Given /^I enable the specific Tor configuration option$/ do
@screen.click('TailsGreeterTorConf.png')
end
Given /^I set an administration password$/ do |password|
Given /^I set an administration password$/ do
next if @skip_steps_while_restoring_background
@screen.wait("TailsGreeterAdminPassword.png", 20)
@screen.type(@sudo_password)
......
......@@ -77,8 +77,8 @@ def checkpoints
:steps => [
'I log in to a new session',
'Tails seems to have booted normally',
'I create a persistent partition with password "asdf"',
'a Tails persistence partition with password "asdf" exists on USB drive "current"',
'I create a persistent partition',
'a Tails persistence partition exists on USB drive "current"',
'I shutdown Tails and wait for the computer to power off',
'I start Tails from USB drive "current" with network unplugged',
'the boot device has safe access rights',
......
......@@ -199,12 +199,12 @@ Given /^I enable all persistence presets$/ do
@screen.type(Sikuli::Key.F4, Sikuli::KeyModifier.ALT)
end
Given /^I create a persistent partition with password "([^"]+)"$/ do |pwd|
Given /^I create a persistent partition$/ do
next if @skip_steps_while_restoring_background
step 'I start "ConfigurePersistentVolume" via the GNOME "Tails" applications menu'
@screen.wait('PersistenceWizardWindow.png', 40)
@screen.wait('PersistenceWizardStart.png', 20)
@screen.type(pwd + "\t" + pwd + Sikuli::Key.ENTER)
@screen.type(@persistence_password + "\t" + @persistence_password + Sikuli::Key.ENTER)
@screen.wait('PersistenceWizardPresets.png', 300)
step "I enable all persistence presets"
end
......@@ -279,7 +279,7 @@ Then /^there is no persistence partition on USB drive "([^"]+)"$/ do |name|
"USB drive #{name} has a partition '#{data_part_dev}'")
end
Then /^a Tails persistence partition with password "([^"]+)" exists on USB drive "([^"]+)"$/ do |pwd, name|
Then /^a Tails persistence partition exists on USB drive "([^"]+)"$/ do |name|
next if @skip_steps_while_restoring_background
dev = $vm.disk_dev(name) + "2"
check_part_integrity(name, dev, "crypto", "crypto_LUKS", "gpt", "TailsData")
......@@ -297,7 +297,8 @@ Then /^a Tails persistence partition with password "([^"]+)" exists on USB drive
end
end
if luks_dev.nil?
c = $vm.execute("echo #{pwd} | cryptsetup luksOpen #{dev} #{name}")
c = $vm.execute("echo #{@persistence_password} | " +
"cryptsetup luksOpen #{dev} #{name}")
assert(c.success?, "Couldn't open LUKS device '#{dev}' on drive '#{name}'")
luks_dev = "/dev/mapper/#{name}"
end
......@@ -320,14 +321,14 @@ Then /^a Tails persistence partition with password "([^"]+)" exists on USB drive
$vm.execute("cryptsetup luksClose #{name}")
end
Given /^I enable persistence with password "([^"]+)"$/ do |pwd|
Given /^I enable persistence$/ do
next if @skip_steps_while_restoring_background
@screen.wait('TailsGreeterPersistence.png', 10)
@screen.type(Sikuli::Key.SPACE)
@screen.wait('TailsGreeterPersistencePassphrase.png', 10)
match = @screen.find('TailsGreeterPersistencePassphrase.png')
@screen.click(match.getCenter.offset(match.w*2, match.h/2))
@screen.type(pwd)
@screen.type(@persistence_password)
end
def tails_persistence_enabled?
......@@ -361,8 +362,8 @@ Given /^persistence is disabled$/ do
assert(!tails_persistence_enabled?, "Persistence is enabled")
end
Given /^I enable read-only persistence with password "([^"]+)"$/ do |pwd|
step "I enable persistence with password \"#{pwd}\""
Given /^I enable read-only persistence$/ do
step "I enable persistence"
next if @skip_steps_while_restoring_background
@screen.wait_and_click('TailsGreeterPersistenceReadOnly.png', 10)
end
......@@ -549,7 +550,7 @@ Then /^the expected persistent files(| created with the old Tails version) are p
end
end
Then /^only the expected files are present on the persistence partition encrypted with password "([^"]+)" on USB drive "([^"]+)"$/ do |password, name|
Then /^only the expected files are present on the persistence partition on USB drive "([^"]+)"$/ do |name|
next if @skip_steps_while_restoring_background
assert(!$vm.is_running?)
disk = {
......@@ -569,7 +570,7 @@ Then /^only the expected files are present on the persistence partition encrypte
assert_not_nil(partition, "Could not find the 'TailsData' partition " \
"on disk '#{disk_handle}'")
luks_mapping = File.basename(partition) + "_unlocked"
g.luks_open(partition, password, luks_mapping)
g.luks_open(partition, @persistence_password, luks_mapping)
luks_dev = "/dev/mapper/#{luks_mapping}"
mount_point = "/"
g.mount(luks_dev, mount_point)
......
......@@ -95,6 +95,7 @@ Before('@product') do
@language = ""
@os_loader = "MBR"
@sudo_password = "asdf"
@persistence_password = "asdf"
end
# AfterScenario
......
......@@ -85,7 +85,7 @@ Feature: Browsing the web using the Tor Browser
Scenario: The persistent Tor Browser directory is usable
Given Tails has booted without network from a USB drive with a persistent partition and stopped at Tails Greeter's login screen
And the network is plugged
When I enable persistence with password "asdf"
When I enable persistence
And I log in to a new session
And Tails is running from USB drive "current"
And Tor is ready
......@@ -104,7 +104,7 @@ Feature: Browsing the web using the Tor Browser
Given Tails has booted without network from a USB drive with a persistent partition and stopped at Tails Greeter's login screen
And Tails is running from USB drive "current"
And the boot device has safe access rights
And I enable persistence with password "asdf"
And I enable persistence
And I log in to a new session
And the Tails desktop is ready
And all notifications have disappeared
......@@ -117,7 +117,7 @@ Feature: Browsing the web using the Tor Browser
And I add a bookmark to eff.org in the Tor Browser
And I warm reboot the computer
And the computer reboots Tails
And I enable read-only persistence with password "asdf"
And I enable read-only persistence
And I log in to a new session
And the Tails desktop is ready
And I start the Tor Browser in offline mode
......
......@@ -26,14 +26,14 @@ Feature: Installing Tails to a USB drive
Given a computer
And I start Tails from USB drive "old" with network unplugged and I login
Then Tails is running from USB drive "old"
And I create a persistent partition with password "asdf"
And I create a persistent partition
And I take note of which persistence presets are available
Then a Tails persistence partition with password "asdf" exists on USB drive "old"
Then a Tails persistence partition on exists USB drive "old"
And I shutdown Tails and wait for the computer to power off
Scenario: Writing files to a read/write-enabled persistent partition with the old Tails USB installation
Given a computer
And I start Tails from USB drive "old" with network unplugged and I login with persistence password "asdf"
And I start Tails from USB drive "old" with network unplugged and I login with persistence enabled
Then Tails is running from USB drive "old"
And all persistence presets are enabled
And I write some files expected to persist
......@@ -43,7 +43,7 @@ Feature: Installing Tails to a USB drive
And I take note of which persistence presets are available
And I shutdown Tails and wait for the computer to power off
# XXX: how does guestfs work vs snapshots?
Then only the expected files are present on the persistence partition encrypted with password "asdf" on USB drive "old"
Then only the expected files are present on the persistence partition on USB drive "old"
Scenario: Upgrading an old Tails USB installation from a Tails DVD
Given a computer
......@@ -56,7 +56,7 @@ Feature: Installing Tails to a USB drive
Scenario: Booting Tails from a USB drive upgraded from DVD with persistence enabled
Given a computer
And I start Tails from USB drive "to_upgrade" with network unplugged and I login with persistence password "asdf"
And I start Tails from USB drive "to_upgrade" with network unplugged and I login with persistence enabled
Then all persistence presets from the old Tails version are enabled
Then Tails is running from USB drive "to_upgrade"
And the boot device has safe access rights
......@@ -77,7 +77,7 @@ Feature: Installing Tails to a USB drive
Scenario: Booting Tails from a USB drive upgraded from USB with persistence enabled
Given a computer
And I start Tails from USB drive "to_upgrade" with network unplugged and I login with persistence password "asdf"
And I start Tails from USB drive "to_upgrade" with network unplugged and I login with persistence enabled
Then all persistence presets from the old Tails version are enabled
And Tails is running from USB drive "to_upgrade"
And the boot device has safe access rights
......@@ -106,7 +106,7 @@ Feature: Installing Tails to a USB drive
Scenario: Booting a USB drive upgraded from ISO with persistence enabled
Given a computer
And I start Tails from USB drive "to_upgrade" with network unplugged and I login with persistence password "asdf"
And I start Tails from USB drive "to_upgrade" with network unplugged and I login with persistence enabled
Then all persistence presets from the old Tails version are enabled
And Tails is running from USB drive "to_upgrade"
And the boot device has safe access rights
......
Supports Markdown
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