Skip to content

Commit c834fb8

Browse files
test(functional): fix github 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 b69130a commit c834fb8

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎gitlab/v4/objects/artifacts.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ def __call__(
3535
) -> Optional[bytes]:
3636
utils.warn(
3737
message=(
38-
"The project.artifacts() method is deprecated and will be "
39-
"removed in a future version. Use project.artifacts.download() instead.\n"
38+
"The project.artifacts() method is deprecated and will be removed in a "
39+
"future version. Use project.artifacts.download() instead.\n"
4040
),
4141
category=DeprecationWarning,
4242
)

‎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.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)