summaryrefslogtreecommitdiff
path: root/qa/qa/service
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-01-22 14:12:36 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-01-22 14:12:36 +0100
commitca4db9d25f797a07bed3750ca9d8f0833487f55c (patch)
treede1f81799b730443f06f776c591214614083fb3c /qa/qa/service
parent50a82f64e53d396ca91f52c4d25af60beb52a424 (diff)
downloadgitlab-ce-ca4db9d25f797a07bed3750ca9d8f0833487f55c.tar.gz
Wait for Runner to register in QA and DRY page objects
Diffstat (limited to 'qa/qa/service')
-rw-r--r--qa/qa/service/runner.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/qa/qa/service/runner.rb b/qa/qa/service/runner.rb
index a9906b8627a..2745bf00ded 100644
--- a/qa/qa/service/runner.rb
+++ b/qa/qa/service/runner.rb
@@ -6,11 +6,11 @@ module QA
include Scenario::Actable
include Service::Shellout
- attr_writer :token, :address, :tags, :image, :name
+ attr_accessor :token, :address, :tags, :image, :name
def initialize
@image = 'gitlab/gitlab-runner:alpine'
- @name = "gitlab-runner-qa-#{SecureRandom.hex(4)}"
+ @name = "qa-runner-#{SecureRandom.hex(4)}"
end
def pull
@@ -18,6 +18,10 @@ module QA
end
def register!
+ ##
+ # TODO, this assumes that `test` network exists, because we know that
+ # gitlab-qa environment orchestration tool creates it.
+ #
shell <<~CMD.tr("\n", ' ')
docker run -d --rm --entrypoint=/bin/sh
--network test --name #{@name}