mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Handle AttributeError for dockerng_mod.docker attempt fails and docker is installed
When we hit that attribute error, we need to set the docker version variable to a tuple starting with 0 so we can use it in other test comparisons. If docker is installed, but at a lower version, we will see this attribute error. Fixes the test failure on the 2016.11 branch on CentOS 6 VMs.
This commit is contained in:
parent
d7d3d68035
commit
99c8dcc18e
1 changed files with 5 additions and 1 deletions
|
@ -37,7 +37,11 @@ class DockerngTestCase(TestCase):
|
|||
Validate dockerng module
|
||||
'''
|
||||
|
||||
docker_version = dockerng_mod.docker.version_info
|
||||
try:
|
||||
docker_version = dockerng_mod.docker.version_info
|
||||
except AttributeError:
|
||||
docker_version = 0,
|
||||
|
||||
client_args_mock = MagicMock(return_value={
|
||||
'create_container': [
|
||||
'image', 'command', 'hostname', 'user', 'detach', 'stdin_open',
|
||||
|
|
Loading…
Add table
Reference in a new issue