BigW Consortium Gitlab

Commit 1783a3d5 by Lin Jen-Shin

Run through all kinds of ssh keys for deploy key

parent 211b2f39
......@@ -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}"
......
......@@ -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
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