-
Notifications
You must be signed in to change notification settings - Fork 24k
move some git integration test setup into the test #83251
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
base: devel
Are you sure you want to change the base?
Conversation
6fbf3c7
to
6771ba0
Compare
09f75e1
to
de6c2ea
Compare
0fba50c
to
23dd743
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
…ernal test dependencies
ci_coverage
ci_coverage
23dd743
to
fc0876e
Compare
Could you expand on what this means? Is there a case where pointing a git remote to an fs-local |
- test_submodules_newer.git | ||
exec: | ||
- 'git submodule add --name submodule1 git://localhost/test_submodules_subm1.git submodule1' | ||
# workaround for changing default submodule branch name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be done through a .gitmodules
file instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does create .gitmodules.
repositories: | ||
- test_submodules_newer.git | ||
exec: | ||
- 'git submodule add --name submodule1 git://localhost/test_submodules_subm1.git submodule1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually, doing the following works just fine:
- - 'git submodule add --name submodule1 git://localhost/test_submodules_subm1.git submodule1'
+ - 'git submodule add --name submodule1 file://path/to/bare/repo/test_submodules_subm1.git submodule1'
Or maybe
- - 'git submodule add --name submodule1 git://localhost/test_submodules_subm1.git submodule1'
+ - 'git submodule add --name submodule1 ../relative/path/to/bare/repo/test_submodules_subm1.git submodule1'
(I don't remember which one works better, but I did use this in the past)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal of this PR is to replace dependencies on external Github repos that aren't managed by Ansible, and not be limited to 1 protocol since some features cannot be tested with file://.
The current tests use absolute URLs, so that's why these are absolute. I could use file:// for these specifically, but a git server is necessary to fully test relative submodules (which can be relative to the repo or origin remote), and because I know that submodules relative to the remote are broken (see #83146), I added the git daemon in this PR to make sure it works with our existing test cases, before I add more complex submodule tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. Thanks for explaining!
|
I'm re-adding |
Makes sense. Since this is just a POC anyway, I moved it out of the CI workflow for now. |
SUMMARY
Add a simple, unauthenticated git server for git tests that can't easily use the local protocol and replace a few external Github dependencies.
This should make it easier to add new tests for submodules, needed by #80456, and any bugfix for #83146.
Related #82013
ISSUE TYPE