Fabrication of QA::Resource::Group fails with 403 when running E2E tests as a non-admin user
Fabrication of QA::Resource::Group using the API failed (403) with `{"message":"403 Forbidden"}`
This happens if you run the tests first as root
and then as another user. The root user creates the sandbox group named "gitlab-qa-sandbox-group", but then that other user doesn't have permission to create subgroups/projects within the sandbox group.
You can get around this by using GITLAB_SANDBOX_NAME
to provide a new sandbox group name to use with the new user.
The problem is that this isn't documented so it's surprising when tests fail, and it's not clear what to do about it.
There's at least a couple of things we could do to fix this.
-
Add a troubleshooting section to the docs that explains this problem and what to do about it. -
Catch this particular error and report a solution (i.e., set GITLAB_SANDBOX_NAME
, or run tests as the same user that created the sandbox group, or delete the default sandbox group so that it can be recreated).
Edited by Mark Lapierre