@@ -1050,6 +1050,14 @@ def create_v4_files(self):
10501050 "tests/backup/v4-firewall.xml"
10511051 f_firewall .write (xml_path .read_bytes ())
10521052
1053+ # setup notes only on one VM
1054+ with open (
1055+ self .fullpath ("appvms/test-work/notes.txt" ),
1056+ "w+" ,
1057+ encoding = "utf-8" ,
1058+ ) as notes :
1059+ notes .write ("For Your Eyes Only" )
1060+
10531061 # StandaloneVMs
10541062 for vm in ('test-standalonevm' , 'test-hvm' ):
10551063 os .mkdir (self .fullpath ('appvms/{}' .format (vm )))
@@ -1528,6 +1536,8 @@ def create_limited_tmpdir(self, size):
15281536 self .addCleanup (self .cleanup_tmpdir , tmpdir )
15291537 return tmpdir .name
15301538
1539+ @unittest .skipUnless (os .environ .get ('ENABLE_LEGACY_TESTS' , False ),
1540+ 'Set ENABLE_LEGACY_TESTS=1 environment variable' )
15311541 def test_210_r2 (self ):
15321542 self .create_v3_backup (False )
15331543 self .app .expected_calls [('dom0' , 'admin.vm.List' , None , None )] = (
@@ -1601,6 +1611,8 @@ def test_210_r2(self):
16011611
16021612 self .assertDom0Restored (dummy_timestamp )
16031613
1614+ @unittest .skipUnless (os .environ .get ('ENABLE_LEGACY_TESTS' , False ),
1615+ 'Set ENABLE_LEGACY_TESTS=1 environment variable' )
16041616 def test_220_r2_encrypted (self ):
16051617 self .create_v3_backup (True )
16061618
@@ -1676,6 +1688,8 @@ def test_220_r2_encrypted(self):
16761688
16771689 self .assertDom0Restored (dummy_timestamp )
16781690
1691+ @unittest .skipUnless (os .environ .get ('ENABLE_LEGACY_TESTS' , False ),
1692+ 'Set ENABLE_LEGACY_TESTS=1 environment variable' )
16791693 def test_230_r2_uncompressed (self ):
16801694 self .create_v3_backup (False , False )
16811695 self .app .expected_calls [('dom0' , 'admin.vm.List' , None , None )] = (
@@ -1781,6 +1795,9 @@ def test_230_r4(self):
17811795 self .app .expected_calls [
17821796 ('test-work' , 'admin.vm.firewall.Set' , None ,
17831797 firewall_data .encode ())] = b'0\0 '
1798+ self .app .expected_calls [
1799+ ('test-work' , 'admin.vm.notes.Set' , None ,
1800+ b'For Your Eyes Only' )] = b'0\0 '
17841801
17851802 qubesd_calls_queue = multiprocessing .Queue ()
17861803
@@ -1858,6 +1875,9 @@ def test_230_r4_compressed(self):
18581875 self .app .expected_calls [
18591876 ('test-work' , 'admin.vm.firewall.Set' , None ,
18601877 firewall_data .encode ())] = b'0\0 '
1878+ self .app .expected_calls [
1879+ ('test-work' , 'admin.vm.notes.Set' , None ,
1880+ b'For Your Eyes Only' )] = b'0\0 '
18611881
18621882 qubesd_calls_queue = multiprocessing .Queue ()
18631883
@@ -1935,6 +1955,9 @@ def test_230_r4_custom_cmpression(self):
19351955 self .app .expected_calls [
19361956 ('test-work' , 'admin.vm.firewall.Set' , None ,
19371957 firewall_data .encode ())] = b'0\0 '
1958+ self .app .expected_calls [
1959+ ('test-work' , 'admin.vm.notes.Set' , None ,
1960+ b'For Your Eyes Only' )] = b'0\0 '
19381961
19391962 qubesd_calls_queue = multiprocessing .Queue ()
19401963
@@ -2049,6 +2072,9 @@ def test_230_r4_uncommon_compression_forced(self):
20492072 self .app .expected_calls [
20502073 ('test-work' , 'admin.vm.firewall.Set' , None ,
20512074 firewall_data .encode ())] = b'0\0 '
2075+ self .app .expected_calls [
2076+ ('test-work' , 'admin.vm.notes.Set' , None ,
2077+ b'For Your Eyes Only' )] = b'0\0 '
20522078
20532079 qubesd_calls_queue = multiprocessing .Queue ()
20542080
@@ -2126,6 +2152,9 @@ def test_230_r4_optional_compression(self):
21262152 self .app .expected_calls [
21272153 ('test-work' , 'admin.vm.firewall.Set' , None ,
21282154 firewall_data .encode ())] = b'0\0 '
2155+ self .app .expected_calls [
2156+ ('test-work' , 'admin.vm.notes.Set' , None ,
2157+ b'For Your Eyes Only' )] = b'0\0 '
21292158
21302159 qubesd_calls_queue = multiprocessing .Queue ()
21312160
@@ -2171,6 +2200,8 @@ def test_230_r4_optional_compression(self):
21712200
21722201 self .assertDom0Restored (dummy_timestamp )
21732202
2203+ @unittest .skipUnless (os .environ .get ('ENABLE_SUPER_SLOW_TESTS' , False ),
2204+ 'Set ENABLE_SUPER_SLOW_TESTS=1 environment variable' )
21742205 @unittest .skipUnless (shutil .which ('scrypt' ),
21752206 "scrypt not installed" )
21762207 def test_300_r4_no_space (self ):
@@ -2202,6 +2233,9 @@ def test_300_r4_no_space(self):
22022233 self .app .expected_calls [
22032234 ('test-work' , 'admin.vm.firewall.Set' , None ,
22042235 firewall_data .encode ())] = b'0\0 '
2236+ self .app .expected_calls [
2237+ ('test-work' , 'admin.vm.notes.Set' , None ,
2238+ b'For Your Eyes Only' )] = b'0\0 '
22052239
22062240 qubesd_calls_queue = multiprocessing .Queue ()
22072241
0 commit comments