Commit a41ce44e authored by Dan Davison's avatar Dan Davison

Merge branch 'qa/re-work-release-e2e-test' into 'master'

Re-work release end-to-end test

See merge request gitlab-org/gitlab-ee!14525
parents db6b5e08 723fbc0a
......@@ -5,33 +5,27 @@ require 'digest/sha1'
module QA
context 'Release', :docker do
describe 'Git clone using a deploy key' do
def login
before do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials)
end
before(:all) do
login
@runner_name = "qa-runner-#{Time.now.to_i}"
@project = Resource::Project.fabricate! do |resource|
@project = Resource::Project.fabricate_via_api! do |resource|
resource.name = 'deploy-key-clone-project'
end
@repository_location = @project.repository_ssh_location
Resource::Runner.fabricate! do |resource|
Resource::Runner.fabricate_via_browser_ui! do |resource|
resource.project = @project
resource.name = @runner_name
resource.tags = %w[qa docker]
resource.image = 'gitlab/gitlab-runner:ubuntu'
end
Page::Main::Menu.perform(&:sign_out)
end
after(:all) do
after do
Service::Runner.new(@runner_name).remove!
end
......@@ -45,9 +39,7 @@ module QA
it "user sets up a deploy key with #{key_class}(#{bits}) to clone code using pipelines" do
key = key_class.new(*bits)
login
Resource::DeployKey.fabricate! do |resource|
Resource::DeployKey.fabricate_via_browser_ui! do |resource|
resource.project = @project
resource.title = "deploy key #{key.name}(#{key.bits})"
resource.key = key.public_key
......@@ -55,7 +47,7 @@ module QA
deploy_key_name = "DEPLOY_KEY_#{key.name}_#{key.bits}"
Resource::CiVariable.fabricate! do |resource|
Resource::CiVariable.fabricate_via_browser_ui! do |resource|
resource.project = @project
resource.key = deploy_key_name
resource.value = key.private_key
......
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