@@ -37,11 +37,15 @@ def config_and_restart(self):
37
37
core .check_system (('osg-configure' , '-c' , '-m' , 'rsv' ), 'osg-configure -c -m rsv' )
38
38
self .start_rsv ()
39
39
40
- def run_metric (self , metric , host = host ):
40
+ def run_metric (self , metric , host = host , accept_status = [ 'OK' ] ):
41
41
command = ('rsv-control' , '--run' , '--host' , host , metric )
42
42
stdout = core .check_system (command , ' ' .join (command ))[0 ]
43
43
44
- self .assert_ (re .search ('metricStatus: OK' , stdout ) is not None )
44
+ metric_passed = False
45
+ for status in accept_status :
46
+ if re .search ("metricStatus: {0}" .format (status ), stdout ) is not None :
47
+ metric_passed = True
48
+ self .assert_ (metric_passed )
45
49
46
50
def load_config_file (self ):
47
51
""" Load /etc/rsv/rsv.conf """
@@ -199,15 +203,21 @@ def test_031_hostcert_expiry_metric(self):
199
203
200
204
self .run_metric ('org.osg.local.hostcert-expiry' )
201
205
206
+ # OSG 3.3 tries to download from IU and causes a failure
207
+ @core .osgrelease (3.4 )
202
208
def test_032_cacert_expiry (self ):
203
- core .skip_ok_unless_installed ('rsv' )
209
+ core .skip_ok_unless_installed ('rsv' , 'htcondor-ce' )
204
210
205
- self .run_metric ('org.osg.certificates.cacert-expiry' )
211
+ self .run_metric ('org.osg.certificates.cacert-expiry' ,
212
+ accept_status = ['OK' , 'WARNING' ])
206
213
214
+ # OSG 3.3 tries to download from IU and causes a failure
215
+ @core .osgrelease (3.4 )
207
216
def test_033_crlcert_expiry (self ):
208
- core .skip_ok_unless_installed ('rsv' )
217
+ core .skip_ok_unless_installed ('rsv' , 'htcondor-ce' )
209
218
210
- self .run_metric ('org.osg.certificates.crl-expiry' )
219
+ self .run_metric ('org.osg.certificates.crl-expiry' ,
220
+ accept_status = ['OK' , 'WARNING' ])
211
221
212
222
213
223
# Print Java version info, mostly useful for debugging test runs.
0 commit comments