Skip to content

Integration tests fail on CreateContainerWithGroupAddTest #769

Closed

Description

@paulbellamy
$ docker run -e NOT_ON_HOST=true -e DOCKER_HOST=tcp://172.17.42.1:2375 -v /tmp:/tmp -v /var/run/docker.sock:/var/run/docker.sock joffrey/docker-py py.test tests/integration_test.py::CreateContainerWithGroupAddTest
============================= test session starts ==============================
platform linux2 -- Python 2.7.10 -- py-1.4.30 -- pytest-2.7.2
rootdir: /home/docker-py, inifile:
plugins: cov
collected 2 items

tests/integration_test.py FF

=================================== FAILURES ===================================
______________ CreateContainerWithGroupAddTest.test_group_id_ints ______________

self = <tests.integration_test.CreateContainerWithGroupAddTest testMethod=test_group_id_ints>

    def test_group_id_ints(self):
        container = self.client.create_container(
            'busybox', 'id -G',
            host_config=self.client.create_host_config(group_add=[1000, 1001])
        )
        self.tmp_containers.append(container)
        self.client.start(container)
        self.client.wait(container)

        logs = self.client.logs(container)
        if six.PY3:
            logs = logs.decode('utf-8')
        groups = logs.strip().split(' ')
>       self.assertIn('1000', groups)
E       AssertionError: '1000' not found in ['0', '10']

tests/integration_test.py:290: AssertionError
____________ CreateContainerWithGroupAddTest.test_group_id_strings _____________

self = <tests.integration_test.CreateContainerWithGroupAddTest testMethod=test_group_id_strings>

    def test_group_id_strings(self):
        container = self.client.create_container(
            'busybox', 'id -G', host_config=self.client.create_host_config(
                group_add=['1000', '1001']
            )
        )
        self.tmp_containers.append(container)
        self.client.start(container)
        self.client.wait(container)

        logs = self.client.logs(container)
        if six.PY3:
            logs = logs.decode('utf-8')
        groups = logs.strip().split(' ')
>       self.assertIn('1000', groups)
E       AssertionError: '1000' not found in ['0', '10']

tests/integration_test.py:307: AssertionError
=========================== 2 failed in 8.47 seconds ===========================

Activity

  1. rade commented on Sep 15, 2015

    @rade

    I believe the test was run against Docker 1.7.1. Could that be the issue, i.e. is the new test depending on some Docker 1.8+ functionality?

  2. shin- commented on Sep 15, 2015

    @shin-
    Contributor

    Oh, yeah. It's only available in 1.8+. I'll add a skip. Thanks for the report.

  3. added this to the 1.5.0 milestone on Sep 15, 2015
  4. self-assigned this
    on Sep 15, 2015
  5. shin- commented on Sep 16, 2015

    @shin-
    Contributor

    Fixed via #764

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions