usb_upgrade.feature 9.52 KB
Newer Older
1
@product
anonym's avatar
anonym committed
2
Feature: Upgrading an old Tails USB installation
3
  As a Tails user
intrigeri's avatar
intrigeri committed
4
  If I have an old version of Tails installed on a USB device
5
6
7
8
  and the USB device has a persistent partition
  I want to upgrade Tails on it
  and keep my persistent partition in the process

9
10
11
12
  # 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).

13
14
15
16
17
18
19
20
  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"

21
22
23
  # 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")
24
25
26
27
  #
  # Boot the system to make sure resizing has happened, and to check
  # the system is sane (safe access rights, no persistence, etc.); end
  # with unplugging to get both a clean state and a stopped machine.
28
29
  Scenario: Installing an old version of Tails to a pristine USB drive
    Given a computer
30
    And I create a 7200 MiB disk named "old"
31
    And I plug USB drive "old"
32
33
34
35
36
37
38
    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
39
40
    And I unplug USB drive "old"

41
  # Depends on scenario: Installing an old version of Tails to a pristine USB drive
42
43
44
45
  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"
46
    And I create a persistent partition
47
    And I take note of which persistence presets are available
anonym's avatar
anonym committed
48
    Then a Tails persistence partition exists on USB drive "old"
49
50
    And I shutdown Tails and wait for the computer to power off

51
  # Depends on scenario: Creating a persistent partition with the old Tails USB installation
52
53
  Scenario: Writing files to a read/write-enabled persistent partition with the old Tails USB installation
    Given a computer
54
    And I start Tails from USB drive "old" with network unplugged and I login with persistence enabled
55
56
    Then Tails is running from USB drive "old"
    And all persistence presets are enabled
anonym's avatar
anonym committed
57
    When I write some files expected to persist
58
59
60
61
62
63
    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?
64
    Then only the expected files are present on the persistence partition on USB drive "old"
65

66
  # Depends on scenario: Writing files to a read/write-enabled persistent partition with the old Tails USB installation
67
  Scenario: Upgrading an old Tails USB installation from a Tails DVD
68
    Given I have started Tails from DVD without network and logged in
69
70
    And I clone USB drive "old" to a new USB drive "to_upgrade"
    And I plug USB drive "to_upgrade"
71
    When I upgrade Tails to USB drive "to_upgrade" by cloning
72
73
74
    Then the running Tails is installed on USB drive "to_upgrade"
    And I unplug USB drive "to_upgrade"

75
  # Depends on scenario: Upgrading an old Tails USB installation from a Tails DVD
76
77
  Scenario: Booting Tails from a USB drive upgraded from DVD with persistence enabled
    Given a computer
78
    And I start Tails from USB drive "to_upgrade" with network unplugged and I login with persistence enabled
79
    Then all persistence presets from the old Tails version are enabled
anonym's avatar
anonym committed
80
    And Tails is running from USB drive "to_upgrade"
81
82
83
84
    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

85
  # Depends on scenario: Writing files to a read/write-enabled persistent partition with the old Tails USB installation
86
  Scenario: Upgrading an old Tails USB installation from another Tails USB drive
87
    Given I have started Tails without network from a USB drive without a persistent partition and stopped at Tails Greeter's login screen
anonym's avatar
anonym committed
88
    And I log in to a new session
89
90
    And I clone USB drive "old" to a new USB drive "to_upgrade"
    And I plug USB drive "to_upgrade"
91
    When I upgrade Tails to USB drive "to_upgrade" by cloning
92
93
    Then the running Tails is installed on USB drive "to_upgrade"
    And I unplug USB drive "to_upgrade"
94
    And I unplug USB drive "__internal"
95

96
  # Depends on scenario: Upgrading an old Tails USB installation from another Tails USB drive
97
98
  Scenario: Booting Tails from a USB drive upgraded from USB with persistence enabled
    Given a computer
99
    And I start Tails from USB drive "to_upgrade" with network unplugged and I login with persistence enabled
100
101
102
103
104
    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
105

106
  @automatic_upgrade
anonym's avatar
anonym committed
107
  Scenario: Upgrading an initial Tails installation with an incremental upgrade
108
    Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
109
    And no SquashFS delta is installed
anonym's avatar
anonym committed
110
    And Tails is fooled to think that version 2.0~test was initially installed
111
    And the file system changes introduced in version 2.2~test are not present
112
    And the file system changes introduced in version 2.3~test are not present
113
114
    When the network is plugged
    And Tor is ready
115
116
    Then I am proposed to install an incremental upgrade to version 2.2~test
    And I can successfully install the incremental upgrade to version 2.2~test
117
118
    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
119
    Then Tails is running version 2.2~test
120
    And all persistence presets are enabled
121
122
    And the file system changes introduced in version 2.2~test are present
    And only the 2.2~test SquashFS delta is installed
123
124
    # Our IUK sets a release date that can make Tor bootstrapping impossible
    Given Tails system time is magically synchronized
125
126
127
128
    # We'll really install Tails_amd64_2.0~test_to_2.3~test.iuk
    # but we need some way to force upgrading a second time in a row
    # even if only the initially installed version is considered
    And Tails is fooled to think that version 2.1~test was initially installed
129
    When the network is plugged
130
    And Tor is ready
131
132
133
134
135
136
137
138
    Then I am proposed to install an incremental upgrade to version 2.3~test
    And I can successfully install the incremental upgrade to version 2.3~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 2.3~test
    And all persistence presets are enabled
    And the file system changes introduced in version 2.3~test are present
    And only the 2.3~test SquashFS delta is installed
139
140
    # Our IUK sets a release date that can make Tor bootstrapping impossible
    Given Tails system time is magically synchronized
anonym's avatar
anonym committed
141
    # Regression test on #8158 (i.e. the IUK's filesystem is not part of the Unsafe Browser's chroot)
142
143
144
145
    When the network is plugged
    And Tor is ready
    Then I successfully start the Unsafe Browser
    And the file system changes introduced in version 2.3~test are present in the Unsafe Browser's chroot
146

147
  @automatic_upgrade
anonym's avatar
anonym committed
148
  Scenario: Upgrading a Tails that has several SquashFS deltas present with an incremental upgrade
149
150
    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 that version 2.0~test was initially installed
151
    And Tails is fooled to think a 2.0.1~test SquashFS delta is installed
152
    And Tails is fooled to think a 2.1~test SquashFS delta is installed
153
154
    When the network is plugged
    And Tor is ready
155
156
157
    Then I am proposed to install an incremental upgrade to version 2.2~test
    And I can successfully install the incremental upgrade to version 2.2~test
    Then only the 2.2~test SquashFS delta is installed
158
159
160
161
162
163
164
165
166
167

  @automatic_upgrade
  Scenario: Upgrading a Tails whose signing key is outdated
    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 that version 2.0~test was initially installed
    And the signing key used by the Upgrader is outdated
    But a current signing key is available on our website
    When the network is plugged
    And Tor is ready
    Then I am proposed to install an incremental upgrade to version 2.2~test