summaryrefslogtreecommitdiff
path: root/spec/requests/api/runner_spec.rb
diff options
context:
space:
mode:
authorDennis Tang <dtang@gitlab.com>2018-05-25 23:56:17 +0200
committerDennis Tang <dtang@gitlab.com>2018-05-25 23:56:17 +0200
commit95a63a881673533e3fd44243297d1a81e19396b6 (patch)
tree9a3190b813e2d599043394b30afaa5a5c8f8e565 /spec/requests/api/runner_spec.rb
parent48e46f959716c8915f5b59d1314b5e5781f3cd8d (diff)
parent50c8ed2bf498c69d3d52ba1451274e3fbf438429 (diff)
downloadgitlab-ce-95a63a881673533e3fd44243297d1a81e19396b6.tar.gz
Merge remote-tracking branch 'origin/master' into 38759-fetch-available-parameters-directly-from-gke-when-creating-a-cluster
Diffstat (limited to 'spec/requests/api/runner_spec.rb')
-rw-r--r--spec/requests/api/runner_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/requests/api/runner_spec.rb b/spec/requests/api/runner_spec.rb
index da392c5ab81..efb9bddde44 100644
--- a/spec/requests/api/runner_spec.rb
+++ b/spec/requests/api/runner_spec.rb
@@ -918,6 +918,22 @@ describe API::Runner, :clean_gitlab_redis_shared_state do
expect(job.reload.trace.raw).to eq 'BUILD TRACE appended appended'
end
+ context 'when job is cancelled' do
+ before do
+ job.cancel
+ end
+
+ context 'when trace is patched' do
+ before do
+ patch_the_trace
+ end
+
+ it 'returns Forbidden ' do
+ expect(response.status).to eq(403)
+ end
+ end
+ end
+
context 'when redis data are flushed' do
before do
redis_shared_state_cleanup!