Skip to content

Commit f04510c

Browse files
committed
chore: clean up temporary logging from conftest.py
1 parent c6c178e commit f04510c

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

tests/functional/conftest.py

+1-8
Original file line numberDiff line numberDiff line change
@@ -96,19 +96,16 @@ def reset_gitlab(gl: gitlab.Gitlab) -> None:
9696
logging.info(f"Deleting project: {project.path_with_namespace!r}")
9797
helpers.safe_delete(project)
9898

99-
full_paths = [group.full_path for group in gl.groups.list()]
100-
logging.info(f"Groups to be deleted: {full_paths}")
10199
for group in gl.groups.list():
102100

103101
# skip deletion of a descendant group to prevent scenarios where parent group gets deleted leaving a dangling descendant whose deletion will throw 404s.
104102
# descendant groups cannot contain the `/` special character: https://docs.gitlab.com/ee/user/reserved_names.html#limitations-on-project-and-group-names
105103
if "/" in group.full_path:
106104
logging.info(
107-
f"Skipping deletion of {group.full_path} as it is a descendant group"
105+
f"Skipping deletion of {group.full_path} as it is a descendant group and will be removed when the parent group is deleted"
108106
)
109107
continue
110108

111-
logging.info(f"Current group: {group.full_path!r}, group_id: {group.get_id()}")
112109
for deploy_token in group.deploytokens.list():
113110
logging.info(
114111
f"Deleting deploy token: {deploy_token.username!r} in "
@@ -117,8 +114,6 @@ def reset_gitlab(gl: gitlab.Gitlab) -> None:
117114
helpers.safe_delete(deploy_token)
118115
logging.info(f"Deleting group: {group.full_path!r}")
119116
helpers.safe_delete(group)
120-
full_paths = [group.full_path for group in gl.groups.list()]
121-
logging.info(f"Groups left: {full_paths}")
122117
for topic in gl.topics.list():
123118
logging.info(f"Deleting topic: {topic.name!r}")
124119
helpers.safe_delete(topic)
@@ -129,8 +124,6 @@ def reset_gitlab(gl: gitlab.Gitlab) -> None:
129124
if user.username not in ["root", "ghost"]:
130125
logging.info(f"Deleting user: {user.username!r}")
131126
helpers.safe_delete(user, hard_delete=True)
132-
users_left = gl.users.list(search="ghost")
133-
print(f"users left: {count(users_left)}")
134127

135128

136129
def set_token(container: str, fixture_dir: pathlib.Path) -> str:

0 commit comments

Comments
 (0)