diff --git a/osgtest/tests/test_47_rsv.py b/osgtest/tests/test_47_rsv.py index 788360e1..018f2b46 100644 --- a/osgtest/tests/test_47_rsv.py +++ b/osgtest/tests/test_47_rsv.py @@ -37,11 +37,15 @@ def config_and_restart(self): core.check_system(('osg-configure', '-c', '-m', 'rsv'), 'osg-configure -c -m rsv') self.start_rsv() - def run_metric(self, metric, host=host): + def run_metric(self, metric, host=host, accept_status=['OK']): command = ('rsv-control', '--run', '--host', host, metric) stdout = core.check_system(command, ' '.join(command))[0] - self.assert_(re.search('metricStatus: OK', stdout) is not None) + metric_passed = False + for status in accept_status: + if re.search("metricStatus: {0}".format(status), stdout) is not None: + metric_passed = True + self.assert_(metric_passed) def load_config_file(self): """ Load /etc/rsv/rsv.conf """ @@ -199,15 +203,21 @@ def test_031_hostcert_expiry_metric(self): self.run_metric('org.osg.local.hostcert-expiry') + # OSG 3.3 tries to download from IU and causes a failure + @core.osgrelease(3.4) def test_032_cacert_expiry(self): - core.skip_ok_unless_installed('rsv') + core.skip_ok_unless_installed('rsv', 'htcondor-ce') - self.run_metric('org.osg.certificates.cacert-expiry') + self.run_metric('org.osg.certificates.cacert-expiry', + accept_status=['OK', 'WARNING']) + # OSG 3.3 tries to download from IU and causes a failure + @core.osgrelease(3.4) def test_033_crlcert_expiry(self): - core.skip_ok_unless_installed('rsv') + core.skip_ok_unless_installed('rsv', 'htcondor-ce') - self.run_metric('org.osg.certificates.crl-expiry') + self.run_metric('org.osg.certificates.crl-expiry', + accept_status=['OK', 'WARNING']) # Print Java version info, mostly useful for debugging test runs.