Skip to content

Commit 3b31ade

Browse files
nicoklausnejch
authored andcommitted
feat(functional): add pull mirror test
1 parent 2411bff commit 3b31ade

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/functional/api/test_projects.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,24 @@ def test_project_remote_mirrors(project):
310310
mirror.delete()
311311

312312

313+
def test_project_pull_mirrors(project):
314+
mirror_url = "https://gitlab.example.com/root/mirror.git"
315+
316+
mirror = project.pull_mirror.create({"url": mirror_url})
317+
assert mirror.url == mirror_url
318+
319+
mirror.enabled = True
320+
mirror.save()
321+
322+
mirror = project.pull_mirror.get()
323+
assert isinstance(mirror, gitlab.v4.objects.ProjectPullMirror)
324+
assert mirror.url == mirror_url
325+
assert mirror.enabled is True
326+
327+
mirror.enabled = False
328+
mirror.save()
329+
330+
313331
def test_project_services(project):
314332
# Use 'update' to create a service as we don't have a 'create' method and
315333
# to add one is somewhat complicated so it hasn't been done yet.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy