mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Don't blowup because of missing env var
This commit is contained in:
parent
ae6ca7e4de
commit
c40d87cc23
1 changed files with 3 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import
|
||||
import functools
|
||||
import os
|
||||
import pytest
|
||||
|
@ -10,7 +12,7 @@ if os.environ.get('KITCHEN_USERNAME') == 'vagrant':
|
|||
else:
|
||||
test_host = testinfra.get_host('paramiko://{KITCHEN_USERNAME}@{KITCHEN_HOSTNAME}:{KITCHEN_PORT}'.format(**os.environ),
|
||||
ssh_identity_file=os.environ.get('KITCHEN_SSH_KEY'))
|
||||
else:
|
||||
elif 'KITCHEN_USERNAME' in os.environ:
|
||||
test_host = testinfra.get_host('docker://{KITCHEN_USERNAME}@{KITCHEN_CONTAINER_ID}'.format(**os.environ))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue