Skip to content

Commit 6619835

Browse files
committed
test: use parentid to identify descendant group in reset_gitlab
1 parent 7c46e4d commit 6619835

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/functional/conftest.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ def reset_gitlab(gl: gitlab.Gitlab) -> None:
9898
for group in gl.groups.list():
9999

100100
# skip deletion of a descendant group to prevent scenarios where parent group gets deleted leaving a dangling descendant whose deletion will throw 404s.
101-
# descendant groups cannot contain the `/` special character: https://docs.gitlab.com/ee/user/reserved_names.html#limitations-on-project-and-group-names
102-
if "/" in group.full_path:
101+
if group.parent_id:
103102
logging.info(
104103
f"Skipping deletion of {group.full_path} as it is a descendant group and will be removed when the parent group is deleted"
105104
)

0 commit comments

Comments
 (0)