Skip to content

git-daemon test fixes #284

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

Merged
merged 2 commits into from
Apr 22, 2015
Merged

git-daemon test fixes #284

merged 2 commits into from
Apr 22, 2015

Conversation

moben
Copy link
Contributor

@moben moben commented Apr 21, 2015

We are building packages in a sandbox that restricts network access somewhat.

Here are a couple of changes I made that should be generally useful.

a) make the git-daemon bind to localhost instead of 0.0.0.0 (aka all interfaces), as there's no reason it should be accessible from the outside
b) make the listen port configurable via an environment variable, in case it is already taken.

No reason to expose a daemon to all interfaces when it is only used for
tests, which connect to localhost anyway.
I'd love to use localhost here instead, but the git-daemon man page points out:

    If IPv6 is not supported, then --listen=hostname is also not
    supported and --listen must be given an IPv4 address.

I don't know of a way to check if git has ipv6 support, but 127.0.0.1
should be around for the foreseeable future
@Byron
Copy link
Member

Byron commented Apr 21, 2015

Thank you very much, I will gladly merge. Would you mind having a look at this line, as indicated by flake8 beforehand ?

The command "nosetests -v --with-coverage" exited with 0.
1.47s$ flake8
./git/test/lib/helper.py:204:121: E501 line too long (125 > 120 characters)
The command "flake8" exited with 1.

You can try it yourself by running:

tox -e flake8

If you are out of time, I can also fix that one later today - just let me know.
Thanks

@Byron Byron added this to the v1.0.1 - Fixes milestone Apr 21, 2015
add a GIT_PYTHON_TEST_GIT_DAEMON_PORT to set a port other than 9418,
for example for when you already have a daemon running on that port.
@Byron Byron self-assigned this Apr 22, 2015
Byron added a commit that referenced this pull request Apr 22, 2015
@Byron Byron merged commit e39c8b0 into gitpython-developers:master Apr 22, 2015
@Byron
Copy link
Member

Byron commented Apr 22, 2015

Thank you :) ! I didn't even notice that the fix was already pushed.

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

Successfully merging this pull request may close these issues.

2 participants