Commit 0138be44 authored by Ramya Authappan's avatar Ramya Authappan

Merge branch 'qa-shl-add-orchestrated-to-restrict-by-ip-address-spec' into 'master'

Tag spec as orchestrated and add TODO

Closes #212544

See merge request gitlab-org/gitlab!30614
parents 1ea8e187 eade7996
...@@ -2,8 +2,9 @@ ...@@ -2,8 +2,9 @@
require 'securerandom' require 'securerandom'
module QA module QA
context 'Manage', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/212544', type: :flaky } do context 'Manage' do
describe 'Group access', :requires_admin do # TODO: Remove the :orchestrated meta after https://gitlab.com/gitlab-org/quality/team-tasks/-/issues/493 is complete
describe 'Group access', :requires_admin, :orchestrated do
include Runtime::IPAddress include Runtime::IPAddress
before(:all) do before(:all) do
...@@ -62,29 +63,6 @@ module QA ...@@ -62,29 +63,6 @@ module QA
end end
end end
# TODO - Remove this block when the test is un-quarantined.
after do |example|
if example.exception
@group.sandbox.visit!
QA::Runtime::Logger.info "On failure - Revisiting: #{@group.sandbox.path}"
QA::Runtime::Logger.info page.save_screenshot(::File.join(QA::Runtime::Namespace.name, "group_sandbox_on_failure.png"), full: true)
page.visit Runtime::Scenario.gitlab_address
Page::Main::Menu.perform(&:sign_out_if_signed_in)
Flow::Login.while_signed_in_as_admin do
@group.sandbox.visit!
Page::Group::Menu.perform(&:click_group_general_settings_item)
Page::Group::Settings::General.perform do |settings|
QA::Runtime::Logger.info "On failure - IP address restriction is set to: #{settings.restricted_ip_address}"
QA::Runtime::Logger.info page.save_screenshot(::File.join(QA::Runtime::Namespace.name, "ip_restriction_on_failure.png"), full: true)
end
end
end
end
private private
def set_ip_address_restriction_to(ip_address) def set_ip_address_restriction_to(ip_address)
...@@ -96,19 +74,6 @@ module QA ...@@ -96,19 +74,6 @@ module QA
Page::Group::Settings::General.perform do |settings| Page::Group::Settings::General.perform do |settings|
settings.set_ip_address_restriction(ip_address) settings.set_ip_address_restriction(ip_address)
end end
# TODO: On un-quarantine, re-evaluate if this is needed.
ensure_ip_address_set_to(ip_address)
end
end
def ensure_ip_address_set_to(ip_address)
@group.sandbox.visit!
Page::Group::Menu.perform(&:click_group_general_settings_item)
Page::Group::Settings::General.perform do |settings|
expect(settings.restricted_ip_address).to eq ip_address
end end
end end
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
require 'securerandom' require 'securerandom'
module QA module QA
# TODO: Remove the :orchestrated meta after https://gitlab.com/gitlab-org/quality/team-tasks/-/issues/493 is complete
context 'Create', :docker, :orchestrated, :requires_admin do context 'Create', :docker, :orchestrated, :requires_admin do
describe 'Jenkins integration' do describe 'Jenkins integration' do
let(:project_name) { "project_with_jenkins_#{SecureRandom.hex(4)}" } let(:project_name) { "project_with_jenkins_#{SecureRandom.hex(4)}" }
......
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