summaryrefslogtreecommitdiffstats
path: root/features/usb_upgrade.feature
blob: 55375392c88b708a35b68b2241721706100bcd92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
@product
Feature: Upgrading an old Tails USB installation
  As a Tails user
  If I have an old version of Tails installed on a USB device
  and the USB device has a persistent partition
  I want to upgrade Tails on it
  and keep my persistent partition in the process

  # An issue with this feature is that scenarios depend on each
  # other. When editing this feature, make sure you understand these
  # dependencies (which are documented below).

  Scenario: Try cloning Tails to a too small partition
    Given I have started Tails from DVD without network and logged in
    And I temporarily create a 7200 MiB disk named "too-small-partition"
    And I create a 500 MiB gpt partition labeled "Tails" with a vfat filesystem on disk "too-small-partition"
    And I plug USB drive "too-small-partition"
    When I start Tails Installer
    Then I am told by Tails Installer that I "need to use a downloaded Tails ISO image"

  # 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 I create a 7200 MiB disk named "old"
    And I plug 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
    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
    And I take note of which persistence presets are available
    Then a Tails persistence partition exists on USB drive "old"
    And I shutdown Tails and wait for the computer to power off

  # Depends on scenario: Creating a persistent partition with the old Tails USB installation
  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 enabled
    Then Tails is running from USB drive "old"
    And all persistence presets are enabled
    When I write some files expected to persist
    And all persistent filesystems have safe access rights
    And all persistence configuration files have safe access rights
    And all persistent directories from the old Tails version have safe access rights
    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 on USB drive "old"

  # 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 a Tails DVD
    Given I have started Tails from DVD without network and logged in
    And I clone USB drive "old" to a new USB drive "to_upgrade"
    And I plug USB drive "to_upgrade"
    When I upgrade Tails to USB drive "to_upgrade" by cloning
    Then the running 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 a Tails DVD
  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 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

  # 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
    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"
    And I plug USB drive "to_upgrade"
    When I upgrade Tails to USB drive "to_upgrade" by cloning
    Then the running Tails is installed on USB drive "to_upgrade"
    And I unplug USB drive "to_upgrade"
    And I unplug USB drive "__internal"

  # Depends on scenario: Upgrading an old Tails USB installation from another Tails 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 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
    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
    When the network is plugged
    And Tor is ready
    And all notifications have disappeared
    Then I am proposed to install an incremental upgrade to version 1.1~test
    And I can successfully install the incremental upgrade to version 1.1~test
    Given I shutdown Tails and wait for the computer to power off
    When I start Tails from USB drive "__internal" with network unplugged and I login with persistence enabled
    Then Tails is running version 1.1~test
    And all persistence presets are enabled
    And the file system changes introduced in version 1.1~test are present
    # Our IUK sets a release date that can make Tor bootstrapping impossible
    Given Tails system time is magically synchronized
    When the network is plugged
    And Tor is ready
    And all notifications have disappeared
    # Regression test on #8158 (i.e. the IUK's filesystem is not part of the Unsafe Browser's chroot)
    And I successfully start the Unsafe Browser
    Then the file system changes introduced in version 1.1~test are present in the Unsafe Browser's chroot