Commit 017b6ac1 authored by Ramya Authappan's avatar Ramya Authappan

Merge branch 'qa-shl-fix-user-access-termination-specs' into 'master'

E2E: Retry on test failure due to delay in user removal to come into effect

See merge request gitlab-org/gitlab!79403
parents 18f18669 1cc70c3d
......@@ -31,6 +31,7 @@ module QA
end
it 'is not allowed to push code via the CLI', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347863' do
QA::Support::Retrier.retry_on_exception(max_attempts: 5, sleep_interval: 2) do
expect do
Resource::Repository::Push.fabricate! do |push|
push.repository_http_uri = @project.repository_http_location.uri
......@@ -42,8 +43,10 @@ module QA
end
end.to raise_error(QA::Support::Run::CommandError, /You are not allowed to push code to this project/)
end
end
it 'is not allowed to create a file via the API', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347864' do
QA::Support::Retrier.retry_on_exception(max_attempts: 5, sleep_interval: 2) do
expect do
Resource::File.fabricate_via_api! do |file|
file.api_client = @user_api_client
......@@ -55,8 +58,10 @@ module QA
end
end.to raise_error(Resource::ApiFabricator::ResourceFabricationFailedError, /403 Forbidden/)
end
end
it 'is not allowed to commit via the API', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347865' do
QA::Support::Retrier.retry_on_exception(max_attempts: 5, sleep_interval: 2) do
expect do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.api_client = @user_api_client
......@@ -71,6 +76,7 @@ module QA
end.to raise_error(Resource::ApiFabricator::ResourceFabricationFailedError, /403 Forbidden - You are not allowed to push into this branch/)
end
end
end
after(:all) do
@user.remove_via_api!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment