fix allowed_env
[tails.git] / features / persistence.feature
blob709a27289837775259d163f2dc5b18dbe488f561
1 @product
2 Feature: Tails persistence
3   As a Tails user
4   I want to use a Persistent Storage
6   Scenario: Tails Persistent Storage behave tests
7     Given I have started Tails from DVD and logged in with an administration password and the network is connected
8     And I update APT using apt
9     And I install "python3-behave" using apt
10     Then the Tails Persistent Storage behave tests pass
12   Scenario: Booting Tails from a USB drive with a disabled persistent partition
13     Given I have started Tails without network from a USB drive with a persistent partition and stopped at Tails Greeter's login screen
14     When I log in to a new session without activating the Persistent Storage
15     Then Tails is running from USB drive "__internal"
16     And persistence is disabled
17     But a Tails persistence partition exists on USB drive "__internal"
19   Scenario: Creating a Persistent Storage
20     Given I have started Tails without network from a USB drive without a persistent partition and logged in
21     Then Tails is running from USB drive "__internal"
22     When I create a file in the Persistent directory
23     And I create a persistent partition with the default settings
24     Then the file I created was copied to the Persistent Storage
25     When I shutdown Tails and wait for the computer to power off
26     And I start Tails from USB drive "__internal" with network unplugged and I login with persistence enabled
27     Then persistence for "Persistent" is enabled
28     And the file I created in the Persistent directory exists
30   Scenario: Booting Tails from a USB drive with an enabled persistent partition and reconfiguring it
31     Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
32     Then Tails is running from USB drive "__internal"
33     And all persistence presets are enabled
34     And all persistent directories have safe access rights
35     When I disable the first persistence preset
36     And I shutdown Tails and wait for the computer to power off
37     And I start Tails from USB drive "__internal" with network unplugged and I login with persistence enabled
38     Then all persistence presets but the first one are enabled
40   Scenario: Activating and deactivating Persistent Storage features
41     Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
42     Then persistence for "Persistent" is enabled
43     And the directory "/home/amnesia/Persistent" exists
44     When I write a file "/home/amnesia/Persistent/foo" with contents "foo"
45     Then the file "/live/persistence/TailsData_unlocked/Persistent/foo" exists
46     When I disable the first persistence preset
47     Then persistence for "Persistent" is not enabled
48     And the directory "/home/amnesia/Persistent" does not exist
49     When I enable the first persistence preset
50     Then persistence for "Persistent" is enabled
51     And the file "/home/amnesia/Persistent/foo" exists
53   Scenario: Writing files to a read/write-enabled persistent partition
54     Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
55     And the network is plugged
56     And Tor is ready
57     And I take note of which persistence presets are available
58     When I write some files expected to persist
59     And I shutdown Tails and wait for the computer to power off
60     # XXX: The next step succeeds (and the --debug output confirms that it's actually looking for the files) but will fail in a subsequent scenario restoring the same snapshot. This exactly what we want, but why does it work? What is guestfs's behaviour when qcow2 internal snapshots are involved?
61     Then only the expected files are present on the persistence partition on USB drive "__internal"
63   Scenario: Creating and using a persistent NetworkManager connection
64     Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
65     And the network is plugged
66     And Tor is ready
67     And I add a wired DHCP NetworkManager connection called "persistent-con-current"
68     And I shutdown Tails and wait for the computer to power off
69     Given I start Tails from USB drive "__internal" with network unplugged and I login with persistence enabled
70     And I capture all network traffic
71     And the network is plugged
72     And Tor is ready
73     And I switch to the "persistent-con-current" NetworkManager connection
74     And the 1st network device has a spoofed MAC address configured
75     And no network device leaked the real MAC address
77   Scenario: Creating persistence from the Welcome Screen
78     Given I have started Tails without network from a USB drive without a persistent partition and stopped at Tails Greeter's login screen
79     And I enable persistence creation in Tails Greeter
80     And I log in to a new session expecting no warning about the Persistent Storage not being activated
81     Then I create a persistent partition with the default settings using the wizard that was already open
83   Scenario: Persistent Greeter options
84     Given I have started Tails without network from a USB drive with a persistent partition and stopped at Tails Greeter's login screen
85     When I enable persistence
86     Then no persistent Greeter options were restored
87     When I set all Greeter options to non-default values
88     And I log in to a new session in German after having activated the Persistent Storage
89     Then all Greeter options are set to non-default values
90     When I cold reboot the computer
91     And the computer reboots Tails
92     Given I enable persistence
93     Then persistent Greeter options were restored
94     When I log in to a new session after having activated the Persistent Storage
95     Then all Greeter options are set to non-default values
97   Scenario: Changing the Persistent Storage passphrase
98     Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
99     # Note that if anything fails after the passphrase was changed and
100     # before it's changed back below, subsequent scenarios might fail
101     # because the Persistent Storage doesn't have the expected passphrase.
102     When I change the passphrase of the Persistent Storage
103     And I shutdown Tails and wait for the computer to power off
104     Then I start Tails from USB drive "__internal" with network unplugged and I login with the changed persistence passphrase
105     And I change the passphrase of the Persistent Storage back to the original
107   Scenario: Deleting a Tails persistent partition
108     Given I have started Tails without network from a USB drive with a persistent partition and stopped at Tails Greeter's login screen
109     And I log in to a new session without activating the Persistent Storage
110     And persistence is disabled
111     But a Tails persistence partition exists on USB drive "__internal"
112     And all notifications have disappeared
113     When I delete the persistent partition
114     Then there is no persistence partition on USB drive "__internal"
116   Scenario: Dotfiles persistence
117     Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
118     When I write some dotfile expected to persist
119     And I shutdown Tails and wait for the computer to power off
120     And I start Tails from USB drive "__internal" with network unplugged and I login with persistence enabled
121     Then the expected persistent dotfile is present in the filesystem