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
1cc70c3d
Commit
1cc70c3d
authored
Feb 07, 2022
by
Sanad Liaquat
Committed by
Ramya Authappan
Feb 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
E2E: Retry on test failure due to delay in user removal to come into effect
parent
b5484949
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
32 deletions
+38
-32
qa/qa/specs/features/api/1_manage/user_access_termination_spec.rb
...ecs/features/api/1_manage/user_access_termination_spec.rb
+38
-32
No files found.
qa/qa/specs/features/api/1_manage/user_access_termination_spec.rb
View file @
1cc70c3d
...
...
@@ -31,44 +31,50 @@ 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
expect
do
Resource
::
Repository
::
Push
.
fabricate!
do
|
push
|
push
.
repository_http_uri
=
@project
.
repository_http_location
.
uri
push
.
file_name
=
'test.txt'
push
.
file_content
=
"# This is a test project named
#{
@project
.
name
}
"
push
.
commit_message
=
'Add test.txt'
push
.
branch_name
=
"new_branch_
#{
SecureRandom
.
hex
(
8
)
}
"
push
.
user
=
@user
end
end
.
to
raise_error
(
QA
::
Support
::
Run
::
CommandError
,
/You are not allowed to push code to this project/
)
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
push
.
file_name
=
'test.txt'
push
.
file_content
=
"# This is a test project named
#{
@project
.
name
}
"
push
.
commit_message
=
'Add test.txt'
push
.
branch_name
=
"new_branch_
#{
SecureRandom
.
hex
(
8
)
}
"
push
.
user
=
@user
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
expect
do
Resource
::
File
.
fabricate_via_api!
do
|
file
|
file
.
api_client
=
@user_api_client
file
.
project
=
@project
file
.
branch
=
"new_branch_
#{
SecureRandom
.
hex
(
8
)
}
"
file
.
commit_message
=
'Add new file'
file
.
name
=
'test.txt'
file
.
content
=
"New file"
end
end
.
to
raise_error
(
Resource
::
ApiFabricator
::
ResourceFabricationFailedError
,
/403 Forbidden/
)
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
file
.
project
=
@project
file
.
branch
=
"new_branch_
#{
SecureRandom
.
hex
(
8
)
}
"
file
.
commit_message
=
'Add new file'
file
.
name
=
'test.txt'
file
.
content
=
"New file"
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
expect
do
Resource
::
Repository
::
Commit
.
fabricate_via_api!
do
|
commit
|
commit
.
api_client
=
@user_api_client
commit
.
project
=
@project
commit
.
branch
=
"new_branch_
#{
SecureRandom
.
hex
(
8
)
}
"
commit
.
start_branch
=
@project
.
default_branch
commit
.
commit_message
=
'Add new file'
commit
.
add_files
([
{
file_path:
'test.txt'
,
content:
'new file'
}
])
end
end
.
to
raise_error
(
Resource
::
ApiFabricator
::
ResourceFabricationFailedError
,
/403 Forbidden - You are not allowed to push into this branch/
)
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
commit
.
project
=
@project
commit
.
branch
=
"new_branch_
#{
SecureRandom
.
hex
(
8
)
}
"
commit
.
start_branch
=
@project
.
default_branch
commit
.
commit_message
=
'Add new file'
commit
.
add_files
([
{
file_path:
'test.txt'
,
content:
'new file'
}
])
end
end
.
to
raise_error
(
Resource
::
ApiFabricator
::
ResourceFabricationFailedError
,
/403 Forbidden - You are not allowed to push into this branch/
)
end
end
end
...
...
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