Browse Source

Skip ping tests when instance does not support ping command

Recently an Ubuntu Minimal instance was added to tobiko and it does not
support ping and ping6 commands. That makes some tests fail, but they
should be skipped instead

Change-Id: I9ff4312fc80503ebc9966347ab2a79a9d91ae321
changes/43/783043/1
Eduardo Olivares 3 weeks ago
parent
commit
9664b940de
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      tobiko/shell/ping/_interface.py

+ 3
- 0
tobiko/shell/ping/_interface.py View File

@ -86,6 +86,9 @@ def get_ping_usage(ssh_client):
ssh_client=ssh_client)
usage = ((result.stdout and str(result.stdout)) or
(result.stderr and str(result.stderr)) or "").strip()
if result.exit_status != 0 and 'command not found' in usage.lower():
raise tobiko.SkipException(
'ping command not installed on this instance')
if usage:
LOG.debug('Got ping usage text')
else:


Loading…
Cancel
Save