← 返回首页
test(functional): fix GitLab configuration to support pagination · python-gitlab/python-gitlab@5b7d00d · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

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

Provide feedback

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

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Commit 5b7d00d

Browse files
test(functional): fix GitLab configuration to support pagination
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
1 parent 5e19694 commit 5b7d00d

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎tests/functional/api/test_gitlab.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ def test_template_dockerfile(gl):
8181

8282

8383
def test_template_gitignore(gl):
84-
assert gl.gitignores.list()
84+
assert gl.gitignores.list(all=True)
8585
gitignore = gl.gitignores.get("Node")
8686
assert gitignore.content is not None
8787

8888

8989
def test_template_gitlabciyml(gl):
90-
assert gl.gitlabciymls.list()
90+
assert gl.gitlabciymls.list(all=True)
9191
gitlabciyml = gl.gitlabciymls.get("Nodejs")
9292
assert gitlabciyml.content is not None
9393

‎tests/functional/api/test_projects.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def test_project_protected_branches(project):
244244

245245

246246
def test_project_remote_mirrors(project):
247-
mirror_url = "http://gitlab.test/root/mirror.git"
247+
mirror_url = "https://gitlab.example.com/root/mirror.git"
248248

249249
mirror = project.remote_mirrors.create({"url": mirror_url})
250250
assert mirror.url == mirror_url

‎tests/functional/fixtures/docker-compose.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ services:
1414
GITLAB_ROOT_PASSWORD: 5iveL!fe
1515
GITLAB_SHARED_RUNNERS_REGISTRATION_TOKEN: registration-token
1616
GITLAB_OMNIBUS_CONFIG: |
17-
external_url 'http://gitlab.test'
17+
external_url 'http://127.0.0.1:8080'
1818
registry['enable'] = false
1919
nginx['redirect_http_to_https'] = false
2020
nginx['listen_port'] = 80

0 commit comments

Comments
 (0)

Footer

© 2026 GitHub, Inc.