summaryrefslogtreecommitdiff
path: root/tests/functional
diff options
context:
space:
mode:
authorBen Brown <ben.brown@codethink.co.uk>2021-06-01 11:48:55 +0100
committerBen Brown <ben.brown@codethink.co.uk>2021-06-01 15:09:08 +0100
commit19a55d80762417311dcebde3f998f5ebc7e78264 (patch)
tree11321487baed0e5730e06f61c0bd172d27d0623b /tests/functional
parent11ae11bfa5f9fcb903689805f8d35b4d62ab0c90 (diff)
downloadgitlab-19a55d80762417311dcebde3f998f5ebc7e78264.tar.gz
test(functional): explicitly remove deploy tokens on reset
Deploy tokens would remain in the instance if the respective project or group was deleted without explicitly revoking the deploy tokens first.
Diffstat (limited to 'tests/functional')
-rw-r--r--tests/functional/conftest.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/functional/conftest.py b/tests/functional/conftest.py
index 2c38b9f..00c3e49 100644
--- a/tests/functional/conftest.py
+++ b/tests/functional/conftest.py
@@ -12,8 +12,12 @@ import gitlab
def reset_gitlab(gl):
# previously tools/reset_gitlab.py
for project in gl.projects.list():
+ for deploy_token in project.deploytokens.list():
+ deploy_token.delete()
project.delete()
for group in gl.groups.list():
+ for deploy_token in group.deploytokens.list():
+ deploy_token.delete()
group.delete()
for variable in gl.variables.list():
variable.delete()