summaryrefslogtreecommitdiff
path: root/spec/requests/api/runner_spec.rb
diff options
context:
space:
mode:
authorDimitrie Hoekstra <dimitrie@gitlab.com>2017-03-17 17:04:51 +0000
committerDimitrie Hoekstra <dimitrie@gitlab.com>2017-03-17 17:04:51 +0000
commitb6bab6ce47813c67ea1e2c7d4fde7d9e320da99c (patch)
tree6c1b7db2aeebc5756c73842cffef22df655cc820 /spec/requests/api/runner_spec.rb
parent116efdaf128ddcccc30fb82615cd964b35cacc53 (diff)
parentbb1620aaf712c22c61fda098260f481ad79a05e2 (diff)
downloadgitlab-ce-b6bab6ce47813c67ea1e2c7d4fde7d9e320da99c.tar.gz
Merge branch 'master' into 'focus-mode-board'focus-mode-board
# Conflicts: # app/views/shared/issuable/_filter.html.haml
Diffstat (limited to 'spec/requests/api/runner_spec.rb')
-rw-r--r--spec/requests/api/runner_spec.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/spec/requests/api/runner_spec.rb b/spec/requests/api/runner_spec.rb
index 15d458e0795..442b2df1952 100644
--- a/spec/requests/api/runner_spec.rb
+++ b/spec/requests/api/runner_spec.rb
@@ -39,6 +39,7 @@ describe API::Runner do
expect(json_response['id']).to eq(runner.id)
expect(json_response['token']).to eq(runner.token)
expect(runner.run_untagged).to be true
+ expect(runner.token).not_to eq(registration_token)
end
context 'when project token is used' do
@@ -49,6 +50,8 @@ describe API::Runner do
expect(response).to have_http_status 201
expect(project.runners.size).to eq(1)
+ expect(Ci::Runner.first.token).not_to eq(registration_token)
+ expect(Ci::Runner.first.token).not_to eq(project.runners_token)
end
end
end
@@ -309,8 +312,8 @@ describe API::Runner do
end
let(:expected_variables) do
- [{ 'key' => 'CI_BUILD_NAME', 'value' => 'spinach', 'public' => true },
- { 'key' => 'CI_BUILD_STAGE', 'value' => 'test', 'public' => true },
+ [{ 'key' => 'CI_JOB_NAME', 'value' => 'spinach', 'public' => true },
+ { 'key' => 'CI_JOB_STAGE', 'value' => 'test', 'public' => true },
{ 'key' => 'DB_NAME', 'value' => 'postgres', 'public' => true }]
end
@@ -434,9 +437,9 @@ describe API::Runner do
context 'when triggered job is available' do
let(:expected_variables) do
- [{ 'key' => 'CI_BUILD_NAME', 'value' => 'spinach', 'public' => true },
- { 'key' => 'CI_BUILD_STAGE', 'value' => 'test', 'public' => true },
- { 'key' => 'CI_BUILD_TRIGGERED', 'value' => 'true', 'public' => true },
+ [{ 'key' => 'CI_JOB_NAME', 'value' => 'spinach', 'public' => true },
+ { 'key' => 'CI_JOB_STAGE', 'value' => 'test', 'public' => true },
+ { 'key' => 'CI_PIPELINE_TRIGGERED', 'value' => 'true', 'public' => true },
{ 'key' => 'DB_NAME', 'value' => 'postgres', 'public' => true },
{ 'key' => 'SECRET_KEY', 'value' => 'secret_value', 'public' => false },
{ 'key' => 'TRIGGER_KEY_1', 'value' => 'TRIGGER_VALUE_1', 'public' => false }]