Skip to content

Use admin token to cleanup resource when possible

Tiffany Rea requested to merge use-admin-token-when-possible into master

What does this MR do and why?

Per discussion #412816 (comment 1403642508) , I'm looking into removing remove_via_api! for resources in tests. While doing so, I noticed we haven't been able to remove User resources in test pipelines delete_test_resources job. This MR is to add logic to allow this job to use admin token where it is available to clean up resources that need admin scope (e.g. users).

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Relates to gitlab-org/quality/quality-engineering/team-tasks#1813

Merge request reports

Loading