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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: Make git-daemon only listen on localhost
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
  • Loading branch information
moben committed Apr 21, 2015
commit bccdb483aaa7235b85a49f2c208ee1befd2706dd
2 changes: 1 addition & 1 deletion git/test/lib/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def remote_repo_creator(self):
temp_dir = osp(_mktemp())
# On windows, this will fail ... we deal with failures anyway and default to telling the user to do it
try:
gd = Git().daemon(temp_dir, enable='receive-pack', as_process=True)
gd = Git().daemon(temp_dir, enable='receive-pack', listen='127.0.0.1', as_process=True)
# yes, I know ... fortunately, this is always going to work if sleep time is just large enough
time.sleep(0.5)
except Exception:
Expand Down