Skip to content

Commit

Permalink
Merge pull request #128 from sthapa/ca_probes_sw_3322
Browse files Browse the repository at this point in the history
Ca probes sw 3322 - allow warning status
  • Loading branch information
brianhlin authored Aug 6, 2018
2 parents 6591fad + e38f0ac commit f89883a
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions osgtest/tests/test_47_rsv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 """
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit f89883a

Please sign in to comment.