@@ -37,11 +37,15 @@ def config_and_restart(self):
3737 core .check_system (('osg-configure' , '-c' , '-m' , 'rsv' ), 'osg-configure -c -m rsv' )
3838 self .start_rsv ()
3939
40- def run_metric (self , metric , host = host ):
40+ def run_metric (self , metric , host = host , accept_status = [ 'OK' ] ):
4141 command = ('rsv-control' , '--run' , '--host' , host , metric )
4242 stdout = core .check_system (command , ' ' .join (command ))[0 ]
4343
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 )
4549
4650 def load_config_file (self ):
4751 """ Load /etc/rsv/rsv.conf """
@@ -199,15 +203,21 @@ def test_031_hostcert_expiry_metric(self):
199203
200204 self .run_metric ('org.osg.local.hostcert-expiry' )
201205
206+ # OSG 3.3 tries to download from IU and causes a failure
207+ @core .osgrelease (3.4 )
202208 def test_032_cacert_expiry (self ):
203- core .skip_ok_unless_installed ('rsv' )
209+ core .skip_ok_unless_installed ('rsv' , 'htcondor-ce' )
204210
205- self .run_metric ('org.osg.certificates.cacert-expiry' )
211+ self .run_metric ('org.osg.certificates.cacert-expiry' ,
212+ accept_status = ['OK' , 'WARNING' ])
206213
214+ # OSG 3.3 tries to download from IU and causes a failure
215+ @core .osgrelease (3.4 )
207216 def test_033_crlcert_expiry (self ):
208- core .skip_ok_unless_installed ('rsv' )
217+ core .skip_ok_unless_installed ('rsv' , 'htcondor-ce' )
209218
210- self .run_metric ('org.osg.certificates.crl-expiry' )
219+ self .run_metric ('org.osg.certificates.crl-expiry' ,
220+ accept_status = ['OK' , 'WARNING' ])
211221
212222
213223 # Print Java version info, mostly useful for debugging test runs.
0 commit comments