Skip to content

Commit f89883a

Browse files
authored
Merge pull request #128 from sthapa/ca_probes_sw_3322
Ca probes sw 3322 - allow warning status
2 parents 6591fad + e38f0ac commit f89883a

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

osgtest/tests/test_47_rsv.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)