TritonDataCenter / sdc-docker

Docker Engine for Triton
Mozilla Public License 2.0
182 stars 49 forks source link

DOCKER-788: update image/container filtering for new API format #79

Closed twhiteman closed 8 years ago

twhiteman commented 8 years ago

With Docker 1.10 (API version 1.22) the filters changed from an array to an object with the value true.

In 1.9.1:

    filters={"label":["com.joyent.package=sample-2G", "foo=bar"]}

In 1.10.0:

    filters={"label":{"com.joyent.package=sample-2G":true, "foo=bar":true}}
trentm commented 8 years ago

Were there tests already for filtering on container labels? I see one test for filtering on image labels.

trentm commented 8 years ago

I assume this passes the suite with each of the CLI versions (including 1.11).

LGTM.

twhiteman commented 8 years ago

There were no tests in sdc-docker covering container filtering - but there is good coverage in the docker/docker nightly tests.

Since the docker/docker integration tests are currently strapped to one version of docker (1.9.2 at time of writing), this is why we didn't notice this breakage.

I'll add a few cli container filter tests to sdc-docker, so that we can have some coverage of this across multiple docker versions.

twhiteman commented 8 years ago

Added container filter tests in new 'cli-filters.test.js' file.