18 Commits
Author SHA1 Message Date
Bryan Boreham aa9caab1b0 Fix incompatibility in Docker Python test
Using code from https://github.com/bboreham/docker-py/tree/v1.9.0-prime

Also change to using Python 3 since 2.x is EOL.
2020-07-31 16:29:41 +00:00
Bryan Boreham c8e7dbd600 Pin busybox version to 1.28 to avoid CI issues 2019-08-14 13:59:41 +00:00
Bryan Boreham fdbffce93a Use modified docker-py to mask change in Docker error message
Before this change, when using Docker 17.06 we get:
tests/integration/container_test.py:121: in test_create_with_restart_policy
    'You cannot remove a running container', err
    E   AssertionError: 'You cannot remove a running container' not found in u'You cannot remove a restarting container

The modified image simply checks for "You cannot remove a".
2017-07-13 14:00:23 +00:00
Marc CARRE 43249a8d39 Change all launch-*/stop-* commands to launch/stop.
Given `proxy` & `router` processes have been merged, `launch-proxy`,
`launch-router`, `stop-proxy`, `stop-router` do not make sense any more, and
should just be `launch` and `stop` with the appropriate flags.
2017-05-10 10:25:36 +00:00
Marc CARRE a81a873703 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
```
2017-04-12 13:05:39 +00:00
Marc CARRE 0dff07dc8b Scripts now source dependencies using relative paths (previously breaking make depending on current directory). 2016-12-13 16:00:37 +00:00
Martynas Pumputis aee35b34fe Pin joffrey/docker-py image to 1.8.1 vsn
The latest image requires 1.12.x dockerd.
2016-09-05 14:30:49 +03:00
Bryan Boreham de802f9d76 Work round docker-py assuming busybox is present (https://github.com/docker/docker-py/issues/852) 2015-11-13 11:44:08 +00:00
Bryan Boreham 804e6ba586 Cope with changes in docker-py structure.
Tests are now in a different directory,
and get sharded by module rather than individually.
2015-11-13 11:08:57 +00:00
Adam Harrison 813edcfe0a Merge branch '1.1' 2015-10-15 14:59:29 +01:00
Adam Harrison dea1405d71 Remove hardcoded docker bridge IP from proxy test 2015-10-15 14:39:56 +01:00
Bryan Boreham da2f98fa8f Remove workaround for upstream, no longer required 2015-09-23 10:15:06 +01:00
Paul Bellamy a23c0237c3 using --collect-only so we don't miss tests 2015-09-01 10:50:13 +01:00
Bryan Boreham 176ee73efe Ensure we have the busybox image 2015-08-28 20:34:43 +01:00
Bryan Boreham 54833195ed Call to docker-py changed upstream 2015-08-28 20:34:43 +01:00
Paul Bellamy 94db0beb25 don't save the python test file when running test/600 2015-08-05 18:04:49 +01:00
Tom Wilkie a87be89095 Typos. Honestly 2015-07-30 11:07:17 +00:00
Tom Wilkie 5c9a13d343 Shard 600_proxy_docker_py into 4. 2015-07-30 10:38:02 +00:00