@@ -954,7 +954,7 @@ def test_relink_partition_filter(self):
954
954
self .assertEqual (
955
955
['Processing files for policy platinum under %s (cleanup=False)'
956
956
% self .devices ,
957
- 'Device: sda1 Step: relink Partitions: 1/3' ,
957
+ 'Step: relink Device: sda1 Policy: platinum Partitions: 1/3' ,
958
958
'1 hash dirs processed (cleanup=False) (1 files, 1 linked, '
959
959
'0 removed, 0 errors)' ],
960
960
self .logger .get_lines_for_level ('info' )
@@ -988,8 +988,8 @@ def test_relink_partition_filter(self):
988
988
self .assertEqual (
989
989
['Processing files for policy platinum under %s (cleanup=False)'
990
990
% self .devices ,
991
- 'Device: sda1 Step: relink Partitions: 2/3' ,
992
- 'Device: sda1 Step: relink Partitions: 3/3' ,
991
+ 'Step: relink Device: sda1 Policy: platinum Partitions: 2/3' ,
992
+ 'Step: relink Device: sda1 Policy: platinum Partitions: 3/3' ,
993
993
'2 hash dirs processed (cleanup=False) (2 files, 2 linked, '
994
994
'0 removed, 0 errors)' ],
995
995
self .logger .get_lines_for_level ('info' )
@@ -1069,7 +1069,7 @@ def test_relink_policy_option(self):
1069
1069
self .assertEqual (
1070
1070
['Processing files for policy gold under %s/%s (cleanup=False)'
1071
1071
% (self .devices , self .existing_device ),
1072
- 'Device: sda1 Step: relink Partitions: 1/1' ,
1072
+ 'Step: relink Device: sda1 Policy: gold Partitions: 1/1' ,
1073
1073
'1 hash dirs processed (cleanup=False) (1 files, 1 linked, '
1074
1074
'0 removed, 0 errors)' ],
1075
1075
self .logger .get_lines_for_level ('info' ))
@@ -1821,7 +1821,8 @@ def test_state_file(self):
1821
1821
# Ack partition 96
1822
1822
r .hook_post_partition (os .path .join (datadir_path , '96' ))
1823
1823
self .assertEqual (r .states ["state" ], {'96' : True , '227' : False })
1824
- self .assertIn ("Device: sda1 Step: relink Partitions: 1/2" ,
1824
+ self .assertIn ("Step: relink Device: sda1 Policy: %s "
1825
+ "Partitions: 1/2" % r .policy .name ,
1825
1826
self .logger .get_lines_for_level ("info" ))
1826
1827
with open (state_file , 'rt' ) as f :
1827
1828
self .assertEqual (json .load (f ), {
@@ -1836,7 +1837,8 @@ def test_state_file(self):
1836
1837
1837
1838
# Ack partition 227
1838
1839
r .hook_post_partition (os .path .join (datadir_path , '227' ))
1839
- self .assertIn ("Device: sda1 Step: relink Partitions: 2/2" ,
1840
+ self .assertIn ("Step: relink Device: sda1 Policy: %s "
1841
+ "Partitions: 2/2" % r .policy .name ,
1840
1842
self .logger .get_lines_for_level ("info" ))
1841
1843
self .assertEqual (r .states ["state" ], {'96' : True , '227' : True })
1842
1844
with open (state_file , 'rt' ) as f :
@@ -1879,7 +1881,8 @@ def test_state_file(self):
1879
1881
r .partitions_filter ("" , ['96' , '227' , '312' ]))
1880
1882
# Ack partition 227
1881
1883
r .hook_post_partition (os .path .join (datadir_path , '227' ))
1882
- self .assertIn ("Device: sda1 Step: cleanup Partitions: 1/2" ,
1884
+ self .assertIn ("Step: cleanup Device: sda1 Policy: %s "
1885
+ "Partitions: 1/2" % r .policy .name ,
1883
1886
self .logger .get_lines_for_level ("info" ))
1884
1887
self .assertEqual (r .states ["state" ],
1885
1888
{'96' : False , '227' : True })
@@ -1897,7 +1900,8 @@ def test_state_file(self):
1897
1900
1898
1901
# Ack partition 96
1899
1902
r .hook_post_partition (os .path .join (datadir_path , '96' ))
1900
- self .assertIn ("Device: sda1 Step: cleanup Partitions: 2/2" ,
1903
+ self .assertIn ("Step: cleanup Device: sda1 Policy: %s "
1904
+ "Partitions: 2/2" % r .policy .name ,
1901
1905
self .logger .get_lines_for_level ("info" ))
1902
1906
self .assertEqual (r .states ["state" ],
1903
1907
{'96' : True , '227' : True })
0 commit comments