Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
88358ccd
Commit
88358ccd
authored
Apr 06, 2022
by
Andrejs Cunskis
Committed by
Anastasia McDonald
Apr 06, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Promote ip restriction specs to reliable
parent
cacf9078
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
qa/qa/specs/features/ee/browser_ui/1_manage/group/restrict_by_ip_address_spec.rb
.../browser_ui/1_manage/group/restrict_by_ip_address_spec.rb
+10
-8
No files found.
qa/qa/specs/features/ee/browser_ui/1_manage/group/restrict_by_ip_address_spec.rb
View file @
88358ccd
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment