Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contributing.md Directions and test file #377

Closed
humphries40 opened this issue Aug 6, 2014 · 7 comments
Closed

Contributing.md Directions and test file #377

humphries40 opened this issue Aug 6, 2014 · 7 comments

Comments

@humphries40
Copy link

So, I'm just getting into this and was setting up a development environment to play around in and I noticed a few things with the directions and the test file.

Directions about running the test file are incomplete, it just says run "script/test" which I assumed was from outside the docker container and because of that it didn't do anything. So once I opened the container and ran the test suite from in there it worked!

Next issue, all I've done is follow directions and when I run this test suite for the first time it already returns 3 errors. I'm just getting into all of this so I really have no idea what's happening and I thought I'd provide this feedback.

======================================================================
ERROR: test suite for <class 'tests.integration.cli_test.CLITestCase'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 208, in run
    self.setUp()
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 291, in setUp
    self.setupContext(ancestor)
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 314, in setupContext
    try_run(context, names)
  File "/usr/local/lib/python2.7/dist-packages/nose/util.py", line 469, in try_run
    return func()
  File "/code/tests/integration/testcases.py", line 13, in setUpClass
    cls.client.pull('busybox', tag='latest')
  File "/code/fig/packages/docker/client.py", line 691, in pull
    headers=headers, stream=stream, timeout=None)
  File "/code/fig/packages/docker/client.py", line 66, in _post
    return self.post(url, **self._set_request_timeout(kwargs))
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 425, in post
    return self.request('POST', url, data=data, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 383, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 486, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 378, in send
    raise ConnectionError(e)
ConnectionError: UnixHTTPConnectionPool(host='localhost', port=None): Max retries exceeded with url: /run/docker.sock/v1.12/images/create?tag=latest&fromImage=busybox (Caused by <class 'socket.error'>: [Errno 2] No such file or directory)

======================================================================
ERROR: test suite for <class 'tests.integration.project_test.ProjectTest'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 208, in run
    self.setUp()
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 291, in setUp
    self.setupContext(ancestor)
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 314, in setupContext
    try_run(context, names)
  File "/usr/local/lib/python2.7/dist-packages/nose/util.py", line 469, in try_run
    return func()
  File "/code/tests/integration/testcases.py", line 13, in setUpClass
    cls.client.pull('busybox', tag='latest')
  File "/code/fig/packages/docker/client.py", line 691, in pull
    headers=headers, stream=stream, timeout=None)
  File "/code/fig/packages/docker/client.py", line 66, in _post
    return self.post(url, **self._set_request_timeout(kwargs))
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 425, in post
    return self.request('POST', url, data=data, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 383, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 486, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 378, in send
    raise ConnectionError(e)
ConnectionError: UnixHTTPConnectionPool(host='localhost', port=None): Max retries exceeded with url: /run/docker.sock/v1.12/images/create?tag=latest&fromImage=busybox (Caused by <class 'socket.error'>: [Errno 2] No such file or directory)

======================================================================
ERROR: test suite for <class 'tests.integration.service_test.ServiceTest'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 208, in run
    self.setUp()
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 291, in setUp
    self.setupContext(ancestor)
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 314, in setupContext
    try_run(context, names)
  File "/usr/local/lib/python2.7/dist-packages/nose/util.py", line 469, in try_run
    return func()
  File "/code/tests/integration/testcases.py", line 13, in setUpClass
    cls.client.pull('busybox', tag='latest')
  File "/code/fig/packages/docker/client.py", line 691, in pull
    headers=headers, stream=stream, timeout=None)
  File "/code/fig/packages/docker/client.py", line 66, in _post
    return self.post(url, **self._set_request_timeout(kwargs))
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 425, in post
    return self.request('POST', url, data=data, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 383, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 486, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 378, in send
    raise ConnectionError(e)
ConnectionError: UnixHTTPConnectionPool(host='localhost', port=None): Max retries exceeded with url: /run/docker.sock/v1.12/images/create?tag=latest&fromImage=busybox (Caused by <class 'socket.error'>: [Errno 2] No such file or directory)

----------------------------------------------------------------------
@dnephin
Copy link

dnephin commented Aug 6, 2014

I don't see the test names in there, I think the formatting got them? Maybe try putting it into a code block so the formatting isn't interpreted as markdown.

I know at least two tests on master will fail if you have docker > 1.0 (See #328)

@dericcrago
Copy link

I'm having a similar experience, here's what I've done so far:

$ sudo docker version
Client version: 1.1.1
Client API version: 1.13
Go version (client): go1.2.1
Git commit (client): bd609d2
Server version: 1.1.1
Server API version: 1.13
Go version (server): go1.2.1
Git commit (server): bd609d2
$ git clone https://github.com/orchardup/fig.git
$ sudo docker build --tag local/fig fig
$ sudo docker run --rm -i -t local/fig /bin/bash
user@06cfbc2c5e3d:/code$ script/test 
EEE.....Fig just read the file 'fig.yaml' on startup, rather than 'fig.yml'
Please be aware that fig.yml the expected extension in most cases, and using .yaml can cause compatibility issues in future
.....................................
======================================================================
ERROR: test suite for <class 'tests.integration.cli_test.CLITestCase'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 208, in run
    self.setUp()
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 291, in setUp
    self.setupContext(ancestor)
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 314, in setupContext
    try_run(context, names)
  File "/usr/local/lib/python2.7/dist-packages/nose/util.py", line 469, in try_run
    return func()
  File "/code/tests/integration/testcases.py", line 13, in setUpClass
    cls.client.pull('busybox', tag='latest')
  File "/code/fig/packages/docker/client.py", line 691, in pull
    headers=headers, stream=stream, timeout=None)
  File "/code/fig/packages/docker/client.py", line 66, in _post
    return self.post(url, **self._set_request_timeout(kwargs))
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 425, in post
    return self.request('POST', url, data=data, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 383, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 486, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 378, in send
    raise ConnectionError(e)
ConnectionError: UnixHTTPConnectionPool(host='localhost', port=None): Max retries exceeded with url: /run/docker.sock/v1.12/images/create?tag=latest&fromImage=busybox (Caused by <class 'socket.error'>: [Errno 2] No such file or directory)

======================================================================
ERROR: test suite for <class 'tests.integration.project_test.ProjectTest'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 208, in run
    self.setUp()
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 291, in setUp
    self.setupContext(ancestor)
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 314, in setupContext
    try_run(context, names)
  File "/usr/local/lib/python2.7/dist-packages/nose/util.py", line 469, in try_run
    return func()
  File "/code/tests/integration/testcases.py", line 13, in setUpClass
    cls.client.pull('busybox', tag='latest')
  File "/code/fig/packages/docker/client.py", line 691, in pull
    headers=headers, stream=stream, timeout=None)
  File "/code/fig/packages/docker/client.py", line 66, in _post
    return self.post(url, **self._set_request_timeout(kwargs))
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 425, in post
    return self.request('POST', url, data=data, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 383, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 486, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 378, in send
    raise ConnectionError(e)
ConnectionError: UnixHTTPConnectionPool(host='localhost', port=None): Max retries exceeded with url: /run/docker.sock/v1.12/images/create?tag=latest&fromImage=busybox (Caused by <class 'socket.error'>: [Errno 2] No such file or directory)

======================================================================
ERROR: test suite for <class 'tests.integration.service_test.ServiceTest'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 208, in run
    self.setUp()
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 291, in setUp
    self.setupContext(ancestor)
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 314, in setupContext
    try_run(context, names)
  File "/usr/local/lib/python2.7/dist-packages/nose/util.py", line 469, in try_run
    return func()
  File "/code/tests/integration/testcases.py", line 13, in setUpClass
    cls.client.pull('busybox', tag='latest')
  File "/code/fig/packages/docker/client.py", line 691, in pull
    headers=headers, stream=stream, timeout=None)
  File "/code/fig/packages/docker/client.py", line 66, in _post
    return self.post(url, **self._set_request_timeout(kwargs))
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 425, in post
    return self.request('POST', url, data=data, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 383, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 486, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 378, in send
    raise ConnectionError(e)
ConnectionError: UnixHTTPConnectionPool(host='localhost', port=None): Max retries exceeded with url: /run/docker.sock/v1.12/images/create?tag=latest&fromImage=busybox (Caused by <class 'socket.error'>: [Errno 2] No such file or directory)

----------------------------------------------------------------------
Ran 42 tests in 0.180s

FAILED (errors=3)

@aanand
Copy link

aanand commented Aug 6, 2014

Fixed the formatting on the original post.

Looks like Fig is failing to connect to the Docker daemon. @humphries40, @dericcrago: what's your $DOCKER_HOST?

@dericcrago
Copy link

@aanand it's empty:

$ echo $DOCKER_HOST

@d11wtq
Copy link

d11wtq commented Aug 6, 2014

If you need to use sudo to run docker, then you'll need to use sudo to run the tests.

@dericcrago
Copy link

Ok, so I think there probably was some confusion on my end as to what the Dockerfile included in the repo is supposed to be used for. Running the tests with sudo, outside of the built container, provided better, but still broken results.

$ sudo script/test

results in 5 errors, all due to something like the this:

APIError: 500 Server Error: Internal Server Error ("Cannot destroy container 81ed1ac36f24831601e7d5ebfbcb98c037873302bdf3fdf20ba288d04854635d: Driver devicemapper failed to remove root filesystem 81ed1ac36f24831601e7d5ebfbcb98c037873302bdf3fdf20ba288d04854635d: Device is Busy")

Which sounds more like a docker issue to me.

@aanand
Copy link

aanand commented Aug 6, 2014

@d11wtq Good point - we should note that in CONTRIBUTING.md, as well as mentioning the whole sudo usermod -aG docker $(whoami) thing (which we still need to put in install.md).

xulike666 pushed a commit to xulike666/compose that referenced this issue Jan 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants