test(functional): fix GitLab configuration to support pagination#1881
test(functional): fix GitLab configuration to support pagination#1881
Conversation
nejch
left a comment
There was a problem hiding this comment.
Thanks for fixing this @JohnVillalovos! tiny comment here.
|
|
||
| def test_project_remote_mirrors(project): | ||
| mirror_url = "http://gitlab.test/root/mirror.git" | ||
| mirror_url = "https://gitlab.com/root/mirror.git" |
There was a problem hiding this comment.
I think push mirrors don't create any requests by default, but just in case:
| mirror_url = "https://gitlab.com/root/mirror.git" | |
| mirror_url = "https://gitlab.example.com/root/mirror.git" |
(from https://datatracker.ietf.org/doc/html/rfc2606#section-3)
There was a problem hiding this comment.
I think push mirrors don't create any requests by default, but just in case:
Yeah push mirroring is disabled by default:
https://docs.gitlab.com/ee/api/remote_mirrors.html#create-a-push-mirror
But a good idea to use a non-real host-name. Let me update it and test locally to make sure it works.
There was a problem hiding this comment.
We enable it a few lines down from here, not sure if has any effects still, but just in case. Thanks :)
There was a problem hiding this comment.
Ah. I wasn't looking at that. Nice that the test works even with a not existing host.
df80cf7 to
e6469df
Compare
When pagination occurs python-gitlab uses the URL provided by the GitLab server to use for the next request. We had previously set the GitLab server configuraiton to say its URL was `http://gitlab.test` which is not in DNS. Set the hostname in the URL to `http://127.0.0.1:8080` which is the correct URL for the GitLab server to be accessed while doing functional tests. Closes: #1877
e6469df to
5b7d00d
Compare
When pagination occurs python-gitlab uses the URL provided by the
GitLab server to use for the next request.
We had previously set the GitLab server configuraiton to say its URL
was
http://gitlab.testwhich is not in DNS. Set the hostnamein the URL to
http://127.0.0.1:8080which is the correct URL for theGitLab server to be accessed while doing functional tests.
Closes: #1877