BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
1783a3d5
Commit
1783a3d5
authored
Mar 09, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run through all kinds of ssh keys for deploy key
parent
211b2f39
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
base.rb
qa/qa/runtime/key/base.rb
+4
-1
deploy_key_clone_spec.rb
qa/qa/specs/features/project/deploy_key_clone_spec.rb
+14
-2
No files found.
qa/qa/runtime/key/base.rb
View file @
1783a3d5
...
...
@@ -2,9 +2,12 @@ module QA
module
Runtime
module
Key
class
Base
attr_reader
:private_key
,
:public_key
,
:fingerprint
attr_reader
:
name
,
:bits
,
:
private_key
,
:public_key
,
:fingerprint
def
initialize
(
name
,
bits
)
@name
=
name
@bits
=
bits
Dir
.
mktmpdir
do
|
dir
|
path
=
"
#{
dir
}
/id_
#{
name
}
"
...
...
qa/qa/specs/features/project/deploy_key_clone_spec.rb
View file @
1783a3d5
...
...
@@ -3,7 +3,6 @@ require 'digest/sha1'
module
QA
feature
'cloning code using a deploy key'
,
:core
,
:docker
do
let
(
:runner_name
)
{
"qa-runner-
#{
Time
.
now
.
to_i
}
"
}
let
(
:key
)
{
Runtime
::
Key
::
RSA
.
new
}
given
(
:project
)
do
Factory
::
Resource
::
Project
.
fabricate!
do
|
resource
|
...
...
@@ -15,7 +14,19 @@ module QA
Service
::
Runner
.
new
(
runner_name
).
remove!
end
scenario
'user sets up a deploy key to clone code using pipelines'
do
keys
=
[
Runtime
::
Key
::
RSA
.
new
(
2048
),
Runtime
::
Key
::
RSA
.
new
(
4096
),
Runtime
::
Key
::
RSA
.
new
(
8192
),
Runtime
::
Key
::
DSA
.
new
,
Runtime
::
Key
::
ECDSA
.
new
(
256
),
Runtime
::
Key
::
ECDSA
.
new
(
384
),
Runtime
::
Key
::
ECDSA
.
new
(
521
),
Runtime
::
Key
::
ED25519
.
new
]
keys
.
each
do
|
key
|
scenario
"user sets up a deploy key with
#{
key
.
name
}
(
#{
key
.
bits
}
) to clone code using pipelines"
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
...
...
@@ -78,4 +89,5 @@ module QA
end
end
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