Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

test(functional): fix GitLab configuration to support pagination#1881

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nejch merged 1 commit intomainfromjlvillal/easy2
Feb 5, 2022

Conversation

JohnVillalovos
Copy link
Member

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
washttp://gitlab.test which is not in DNS. Set the hostname
in the URL tohttp://127.0.0.1:8080 which is the correct URL for the
GitLab server to be accessed while doing functional tests.

Closes:#1877

Copy link
Member

@nejchnejch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks for fixing this@JohnVillalovos! tiny comment here.

@@ -244,7 +244,7 @@ def test_project_protected_branches(project):


def test_project_remote_mirrors(project):
mirror_url = "http://gitlab.test/root/mirror.git"
mirror_url = "https://gitlab.com/root/mirror.git"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think push mirrors don't create any requests by default, but just in case:

Suggested change
mirror_url="https://gitlab.com/root/mirror.git"
mirror_url="https://gitlab.example.com/root/mirror.git"

(fromhttps://datatracker.ietf.org/doc/html/rfc2606#section-3)

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

We enable it a few lines down from here, not sure if has any effects still, but just in case. Thanks :)

JohnVillalovos reacted with thumbs up emoji
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Ah. I wasn't looking at that. Nice that the test works even with a not existing host.

When pagination occurs python-gitlab uses the URL provided by theGitLab server to use for the next request.We had previously set the GitLab server configuraiton to say its URLwas `http://gitlab.test` which is not in DNS. Set the hostnamein the URL to `http://127.0.0.1:8080` which is the correct URL for theGitLab server to be accessed while doing functional tests.Closes:#1877
@nejchnejch merged commit4cb7d92 intomainFeb 5, 2022
@nejchnejch deleted the jlvillal/easy2 branchFebruary 5, 2022 23:10
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nejchnejchAwaiting requested review from nejch

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

list() pagination doesn't work in functional tests
2 participants
@JohnVillalovos@nejch

[8]ページ先頭

©2009-2025 Movatter.jp