Commit 88358ccd authored by Andrejs Cunskis's avatar Andrejs Cunskis Committed by Anastasia McDonald

Promote ip restriction specs to reliable

parent cacf9078
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module QA module QA
RSpec.describe 'Manage' do RSpec.describe 'Manage' do
describe 'Group access', :requires_admin, :skip_live_env, except: { job: 'review-qa-*' } do describe 'Group access', :requires_admin, :skip_live_env, :reliable do
include Runtime::IPAddress include Runtime::IPAddress
before(:all) do before(:all) do
...@@ -46,7 +46,7 @@ module QA ...@@ -46,7 +46,7 @@ module QA
context 'when restricted by another ip address' do context 'when restricted by another ip address' do
let(:ip_address) { get_next_ip_address(fetch_current_ip_address) } let(:ip_address) { get_next_ip_address(fetch_current_ip_address) }
context 'via the UI' do context 'with UI' do
it 'denies access', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347923' do it 'denies access', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347923' do
Flow::Login.sign_in(as: @user) Flow::Login.sign_in(as: @user)
...@@ -60,7 +60,7 @@ module QA ...@@ -60,7 +60,7 @@ module QA
end end
end end
context 'via the API' do context 'with API' do
it 'denies access', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347922' do it 'denies access', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347922' do
request = create_request("/groups/#{@sandbox_group.id}") request = create_request("/groups/#{@sandbox_group.id}")
response = get request.url response = get request.url
...@@ -74,7 +74,7 @@ module QA ...@@ -74,7 +74,7 @@ module QA
# Note: If you run this test against GDK make sure you've enabled sshd # Note: If you run this test against GDK make sure you've enabled sshd
# See: https://gitlab.com/gitlab-org/gitlab-qa/blob/master/docs/run_qa_against_gdk.md # See: https://gitlab.com/gitlab-org/gitlab-qa/blob/master/docs/run_qa_against_gdk.md
context 'via the SSH' do context 'with SSH', except: { job: 'review-qa-*' } do
let(:key) do let(:key) do
Resource::SSHKey.fabricate_via_api! do |ssh_key| Resource::SSHKey.fabricate_via_api! do |ssh_key|
ssh_key.api_client = @api_client ssh_key.api_client = @api_client
...@@ -87,7 +87,9 @@ module QA ...@@ -87,7 +87,9 @@ module QA
end end
it 'denies access', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347921' do it 'denies access', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347921' do
expect { push_a_project_with_ssh_key(key) }.to raise_error(QA::Support::Run::CommandError, /fatal: Could not read from remote repository/) expect { push_a_project_with_ssh_key(key) }.to raise_error(
QA::Support::Run::CommandError, /fatal: Could not read from remote repository/
)
end end
end end
end end
...@@ -95,7 +97,7 @@ module QA ...@@ -95,7 +97,7 @@ module QA
context 'when restricted by user\'s ip address' do context 'when restricted by user\'s ip address' do
let(:ip_address) { fetch_current_ip_address } let(:ip_address) { fetch_current_ip_address }
context 'via the UI' do context 'with UI' do
it 'allows access', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347926' do it 'allows access', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347926' do
Flow::Login.sign_in(as: @user) Flow::Login.sign_in(as: @user)
...@@ -107,7 +109,7 @@ module QA ...@@ -107,7 +109,7 @@ module QA
end end
end end
context 'via the API' do context 'with API' do
it 'allows access', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347925' do it 'allows access', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347925' do
request = create_request("/groups/#{@sandbox_group.id}") request = create_request("/groups/#{@sandbox_group.id}")
response = get request.url response = get request.url
...@@ -121,7 +123,7 @@ module QA ...@@ -121,7 +123,7 @@ module QA
# Note: If you run this test against GDK make sure you've enabled sshd # Note: If you run this test against GDK make sure you've enabled sshd
# See: https://gitlab.com/gitlab-org/gitlab-qa/blob/master/docs/run_qa_against_gdk.md # See: https://gitlab.com/gitlab-org/gitlab-qa/blob/master/docs/run_qa_against_gdk.md
context 'via the SSH' do context 'with SSH', except: { job: 'review-qa-*' } do
let(:key) do let(:key) do
Resource::SSHKey.fabricate_via_api! do |ssh_key| Resource::SSHKey.fabricate_via_api! do |ssh_key|
ssh_key.api_client = @api_client ssh_key.api_client = @api_client
......
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