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
ad19a475
Commit
ad19a475
authored
Sep 30, 2020
by
Mark Lapierre
Committed by
Dan Davison
Sep 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete SSH keys created by tests
parent
1eeec3fe
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
54 additions
and
6 deletions
+54
-6
qa/qa/resource/ssh_key.rb
qa/qa/resource/ssh_key.rb
+9
-0
qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_personal_snippet_spec.rb
...3_create/snippet/clone_push_pull_personal_snippet_spec.rb
+4
-0
qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_project_snippet_spec.rb
.../3_create/snippet/clone_push_pull_project_snippet_spec.rb
+4
-0
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
+8
-0
qa/qa/specs/features/ee/browser_ui/1_manage/instance/instance_audit_logs_spec.rb
.../browser_ui/1_manage/instance/instance_audit_logs_spec.rb
+7
-1
qa/qa/specs/features/ee/browser_ui/geo/ssh_push_spec.rb
qa/qa/specs/features/ee/browser_ui/geo/ssh_push_spec.rb
+6
-2
qa/qa/specs/features/ee/browser_ui/geo/ssh_push_to_secondary_spec.rb
.../features/ee/browser_ui/geo/ssh_push_to_secondary_spec.rb
+6
-2
qa/qa/specs/features/ee/browser_ui/geo/wiki_ssh_push_spec.rb
qa/qa/specs/features/ee/browser_ui/geo/wiki_ssh_push_spec.rb
+6
-1
qa/qa/specs/features/ee/browser_ui/geo/wiki_ssh_push_to_secondary_spec.rb
...ures/ee/browser_ui/geo/wiki_ssh_push_to_secondary_spec.rb
+4
-0
No files found.
qa/qa/resource/ssh_key.rb
View file @
ad19a475
...
...
@@ -76,6 +76,15 @@ module QA
parse_body
(
response
)[
:title
].
include?
(
title
)
end
end
private
def
api_get
with_paginated_response_body
(
Runtime
::
API
::
Request
.
new
(
api_client
,
'/user/keys'
,
per_page:
'100'
).
url
)
do
|
page
|
key
=
page
.
find
{
|
key
|
key
[
:title
]
==
title
}
break
process_api_response
(
key
)
if
key
end
end
end
end
end
qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_personal_snippet_spec.rb
View file @
ad19a475
...
...
@@ -36,6 +36,10 @@ module QA
Flow
::
Login
.
sign_in
end
after
do
ssh_key
.
remove_via_api!
end
it
'clones, pushes, and pulls a snippet over HTTP, edits via UI'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/826'
do
Resource
::
Repository
::
Push
.
fabricate!
do
|
push
|
push
.
repository_http_uri
=
repository_uri_http
...
...
qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_project_snippet_spec.rb
View file @
ad19a475
...
...
@@ -36,6 +36,10 @@ module QA
Flow
::
Login
.
sign_in
end
after
do
ssh_key
.
remove_via_api!
end
it
'clones, pushes, and pulls a project snippet over HTTP, edits via UI'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/833'
do
Resource
::
Repository
::
Push
.
fabricate!
do
|
push
|
push
.
repository_http_uri
=
repository_uri_http
...
...
qa/qa/specs/features/ee/browser_ui/1_manage/group/restrict_by_ip_address_spec.rb
View file @
ad19a475
...
...
@@ -83,6 +83,10 @@ module QA
end
end
after
do
key
.
remove_via_api!
end
it
'denies access'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/860'
do
expect
{
push_a_project_with_ssh_key
(
key
)
}.
to
raise_error
(
QA
::
Git
::
Repository
::
RepositoryCommandError
,
/fatal: Could not read from remote repository/
)
end
...
...
@@ -126,6 +130,10 @@ module QA
end
end
after
do
key
.
remove_via_api!
end
it
'allows access'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/863'
do
expect
{
push_a_project_with_ssh_key
(
key
)
}.
not_to
raise_error
end
...
...
qa/qa/specs/features/ee/browser_ui/1_manage/instance/instance_audit_logs_spec.rb
View file @
ad19a475
...
...
@@ -45,13 +45,19 @@ module QA
end
context
'Add SSH key'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/738'
do
key
=
nil
before
do
sign_in
Resource
::
SSHKey
.
fabricate_via_browser_ui!
do
|
resource
|
key
=
Resource
::
SSHKey
.
fabricate_via_browser_ui!
do
|
resource
|
resource
.
title
=
"key for audit event test
#{
Time
.
now
.
to_f
}
"
end
end
after
do
key
&
.
reload!
&
.
remove_via_api!
end
it_behaves_like
'audit event'
,
[
"Added SSH key"
]
end
...
...
qa/qa/specs/features/ee/browser_ui/geo/ssh_push_spec.rb
View file @
ad19a475
...
...
@@ -5,12 +5,17 @@ module QA
describe
'GitLab SSH push'
do
let
(
:file_name
)
{
'README.md'
}
key
=
nil
after
do
key
&
.
remove_via_api!
end
context
'regular git commit'
do
it
"is replicated to the secondary"
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/686'
do
key_title
=
"Geo SSH
#{
Time
.
now
.
to_f
}
"
file_content
=
'This is a Geo project! Commit from primary.'
project
=
nil
key
=
nil
QA
::
Flow
::
Login
.
while_signed_in
(
address: :geo_primary
)
do
# Create a new SSH key for the user
...
...
@@ -73,7 +78,6 @@ module QA
key_title
=
"Geo SSH LFS
#{
Time
.
now
.
to_f
}
"
file_content
=
'The rendered file could not be displayed because it is stored in LFS.'
project
=
nil
key
=
nil
QA
::
Flow
::
Login
.
while_signed_in
(
address: :geo_primary
)
do
# Create a new SSH key for the user
...
...
qa/qa/specs/features/ee/browser_ui/geo/ssh_push_to_secondary_spec.rb
View file @
ad19a475
...
...
@@ -6,12 +6,17 @@ module QA
let
(
:file_content_primary
)
{
'This is a Geo project! Commit from primary.'
}
let
(
:file_content_secondary
)
{
'This is a Geo project! Commit from secondary.'
}
key
=
nil
after
do
key
&
.
remove_via_api!
end
context
'regular git commit'
do
it
'is proxied to the primary and ultimately replicated to the secondary'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/698'
do
file_name
=
'README.md'
key_title
=
"Geo SSH to 2nd
#{
Time
.
now
.
to_f
}
"
project
=
nil
key
=
nil
QA
::
Flow
::
Login
.
while_signed_in
(
address: :geo_primary
)
do
# Create a new SSH key for the user
...
...
@@ -95,7 +100,6 @@ module QA
file_name_primary
=
'README.md'
file_name_secondary
=
'README_MORE.md'
project
=
nil
key
=
nil
QA
::
Flow
::
Login
.
while_signed_in
(
address: :geo_primary
)
do
# Create a new SSH key for the user
...
...
qa/qa/specs/features/ee/browser_ui/geo/wiki_ssh_push_spec.rb
View file @
ad19a475
...
...
@@ -3,12 +3,17 @@
module
QA
RSpec
.
describe
'Geo'
,
:orchestrated
,
:geo
do
describe
'GitLab wiki SSH push'
do
key
=
nil
after
do
key
&
.
remove_via_api!
end
context
'wiki commit'
do
it
'is replicated to the secondary'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/688'
do
wiki_content
=
'This tests replication of wikis via SSH'
push_content
=
'This is from the Geo wiki push via SSH!'
project
=
nil
key
=
nil
QA
::
Flow
::
Login
.
while_signed_in
(
address: :geo_primary
)
do
# Create a new SSH key
...
...
qa/qa/specs/features/ee/browser_ui/geo/wiki_ssh_push_to_secondary_spec.rb
View file @
ad19a475
...
...
@@ -34,6 +34,10 @@ module QA
end
end
after
do
key
.
remove_via_api!
end
it
'proxies wiki commit to primary node and ultmately replicates to secondary node'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/694'
do
QA
::
Runtime
::
Logger
.
debug
(
'*****Visiting the secondary geo node*****'
)
...
...
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