Commit 73afff29 authored by intrigeri's avatar intrigeri

Merge branch 'test/16004-adapt-usb-scenarios-to-usb-images' into feature/15292-usb-image

This branch might be incomplete (left to check) and it needs a tiny bit of
polishing, but it's definitely an incremental improvement over the current
state of things: this will ensure we have a more relevant test suite
when preparing 3.12~rc1.

refs: #16004
parents e4267074 7f4dac0d
......@@ -64,14 +64,11 @@ def checkpoints
'usb-install-tails-greeter' => {
:description => "I have started Tails without network from a USB drive without a persistent partition and stopped at Tails Greeter's login screen",
:parent_checkpoint => 'no-network-logged-in',
:parent_checkpoint => nil,
:steps => [
'I create a 7200 MiB disk named "__internal"',
'I plug USB drive "__internal"',
'I install Tails to USB drive "__internal" by cloning',
'the running Tails is installed on USB drive "__internal"',
'there is no persistence partition on USB drive "__internal"',
'I shutdown Tails and wait for the computer to power off',
'I write the Tails USB image to disk "__internal"',
'I start Tails from USB drive "__internal" with network unplugged',
'the boot device has safe access rights',
'Tails is running from USB drive "__internal"',
......
......@@ -29,9 +29,10 @@ Given /^I create an?( (\d+) ([[:alpha:]]+))? ([[:alnum:]]+) partition( labeled "
$vm.storage.disk_mkpartfs(name, parttype, fstype, opts)
end
Given /^I write the Tails (ISO|USB) image to disk "([^"]+)"$/ do |type, name|
Given /^I write (|an old version of )the Tails (ISO|USB) image to disk "([^"]+)"$/ do |old, type, name|
src_disk = {
:path => (type == 'ISO' ? TAILS_ISO : TAILS_IMG),
:path => (old == '' ? (type == 'ISO' ? TAILS_ISO : TAILS_IMG)
: (type == 'ISO' ? OLD_TAILS_ISO : OLD_TAILS_IMG)),
:opts => {
:format => "raw",
:readonly => true
......
......@@ -56,26 +56,23 @@ Feature: Installing Tails to a USB drive
But there is no persistence partition on USB drive "install"
Scenario: Re-installing Tails over an existing USB installation with a persistent partition
# XXX: We reach this first checkpoint only to ensure that the ' __internal' disk has reached the state (Tails installed + persistent partition set up) we need before we clone it below.
# XXX: do this "Given" without Tails Installer
# We reach this first checkpoint only to ensure that the ' __internal' disk has reached the state (Tails installed + persistent partition set up) we need before we clone it below.
# This first part is done without Tails Installer (install from Tails USB image)
Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
Given I have started Tails from DVD without network and logged in
And I clone USB drive "__internal" to a temporary USB drive "install"
And I plug USB drive "install"
# XXX: keep doing reinstall with Tails Installer: that's what this scenario
# is about
# This second part is done with Tails Installer, that's what this scenario is about
When I reinstall Tails to USB drive "install" by cloning
Then the running Tails is installed on USB drive "install"
And there is no persistence partition on USB drive "install"
# XXX: do this without Tails Installer
Scenario: Booting Tails from a USB drive without a persistent partition and creating one
Given I have started Tails without network from a USB drive without a persistent partition and stopped at Tails Greeter's login screen
And I log in to a new session
When I create a persistent partition
Then a Tails persistence partition exists on USB drive "__internal"
# XXX: do this without Tails Installer
Scenario: Booting Tails from a USB drive without a persistent partition
Given I have started Tails without network from a USB drive without a persistent partition and stopped at Tails Greeter's login screen
When I log in to a new session
......@@ -83,7 +80,6 @@ Feature: Installing Tails to a USB drive
And the persistent Tor Browser directory does not exist
And there is no persistence partition on USB drive "__internal"
# XXX: do this without Tails Installer
#13459
@fragile
Scenario: Booting Tails from a USB drive in UEFI mode
......
......@@ -18,21 +18,21 @@ Feature: Upgrading an old Tails USB installation
When I start Tails Installer
Then I am told by Tails Installer that I "need to use a downloaded Tails ISO image"
# XXX: take a shortcut and write the USB image directly to a USB drive
# Installation method inspired by the usb-install-tails-greeter
# checkpoint, variations are using the old Tails USB image and a
# different device name ("old" instead of "__internal")
Scenario: Installing an old version of Tails to a pristine USB drive
Given a computer
And the computer is set to boot from the old Tails DVD
And the network is unplugged
And I start the computer
When the computer boots Tails
And I log in to a new session
And all notifications have disappeared
And I create a 7200 MiB disk named "old"
And I plug USB drive "old"
When I install Tails to USB drive "old" by cloning
Then the running Tails is installed on USB drive "old"
But there is no persistence partition on USB drive "old"
And I unplug USB drive "old"
And I write an old version of the Tails USB image to disk "old"
When I start Tails from USB drive "old" with network unplugged
Then the boot device has safe access rights
And Tails is running from USB drive "old"
And there is no persistence partition on USB drive "old"
And process "udev-watchdog" is running
And udev-watchdog is monitoring the correct device
And I shutdown Tails and wait for the computer to power off
# Depends on scenario: Installing an old version of Tails to a pristine USB drive
Scenario: Creating a persistent partition with the old Tails USB installation
......@@ -80,7 +80,6 @@ Feature: Upgrading an old Tails USB installation
# Depends on scenario: Writing files to a read/write-enabled persistent partition with the old Tails USB installation
Scenario: Upgrading an old Tails USB installation from another Tails USB drive
# XXX: ensure we do this Given without Tails Installer (usb-install-tails-greeter)
Given I have started Tails without network from a USB drive without a persistent partition and stopped at Tails Greeter's login screen
And I log in to a new session
And I clone USB drive "old" to a new USB drive "to_upgrade"
......@@ -100,42 +99,7 @@ Feature: Upgrading an old Tails USB installation
And the expected persistent files created with the old Tails version are present in the filesystem
And all persistent directories from the old Tails version have safe access rights
# Depends on scenario: Writing files to a read/write-enabled persistent partition with the old Tails USB installation
# XXX: still documented? if not, drop it.
Scenario: Upgrading an old Tails USB installation from an ISO image, running on the old version
Given a computer
And I clone USB drive "old" to a new USB drive "to_upgrade"
When I start Tails from USB drive "old" with network unplugged and I login
And I plug and mount a USB drive containing the Tails ISO
And I plug USB drive "to_upgrade"
And I upgrade Tails on USB drive "to_upgrade" from an ISO
Then the ISO's Tails is installed on USB drive "to_upgrade"
And I unplug USB drive "to_upgrade"
# Depends on scenario: Writing files to a read/write-enabled persistent partition with the old Tails USB installation
# XXX: still documented? if not, drop it.
Scenario: Upgrading an old Tails USB installation from an ISO image, running on the new version
Given I have started Tails from DVD without network and logged in
And I plug and mount a USB drive containing the Tails ISO
And I clone USB drive "old" to a new USB drive "to_upgrade"
And I plug USB drive "to_upgrade"
And I upgrade Tails on USB drive "to_upgrade" from an ISO
Then the ISO's Tails is installed on USB drive "to_upgrade"
And I unplug USB drive "to_upgrade"
# Depends on scenario: Upgrading an old Tails USB installation from an ISO image, running on the new version
# XXX: still documented? if not, drop it.
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 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
And the expected persistent files created with the old Tails version are present in the filesystem
And all persistent directories from the old Tails version have safe access rights
Scenario: Upgrading Tails with Tails Upgrader through an incremental upgrade
# XXX: ensure we do this Given without Tails Installer (usb-install-tails-greeter)
Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
And Tails is fooled to think it is running version 1.0~test
And the file system changes introduced in version 1.1~test are not present
......
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