Upgrade docker-py to 1.9.0-rc2 to fix test #602.
Since 1.12.0, `docker inspect -f "{{ .NetworkSettings.Networks.<network>.Aliases }}"` also returns the container's short ID.
See also: https://github.com/docker/docker/blob/master/CHANGELOG.md
> 1.12.0 (2016-07-28)
> Networking
> Add container's short-id as default network alias #21901
Upgrading `docker/docker-py` to 1.9.0-rc2 effectively relaxes test assertions for:
- `tests/integration/network_test.py#test_connect_with_aliases`
- `tests/integration/network_test.py#test_create_with_aliases`
which do something equivalent to:
```
$ docker network create net1
$ docker run --name c1 -d busybox top
$ docker network connect --alias foo --alias bar net1 c1
$ docker inspect -f "{{ .NetworkSettings.Networks.net1.Aliases }}" c1
[foo bar e52bf50e5ee7]
```
allowing us to be consistent with the above change.
In 1.8.1, the below fails as the container's short ID would be present:
```
self.assertEqual(
container_data['NetworkSettings']['Networks'][net_name]['Aliases'],
['foo', 'bar'])
```
In 1.9.0-rc2, the below passes as the container's short ID is ignored:
```
aliases = (
container_data['NetworkSettings']['Networks'][net_name]['Aliases']
)
assert 'foo' in aliases
assert 'bar' in aliases
```
This commit is contained in:
1 parent
da04d97fb5
commit
a81a873703
1 file changed
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
. "$(dirname "$0")/config.sh"
|
||||
|
||||
IMAGE="joffrey/docker-py:1.8.1"
|
||||
IMAGE="joffrey/docker-py:1.9.0-rc2"
|
||||
|
||||
docker_py_test() {
|
||||
SHARD=$1
|
||||
|
||||
Reference in new issue
Block a user