diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-05-21 16:33:48 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-05-21 16:33:48 +0300 |
commit | 592b8d716f77944e61a7b532028ccf27c8401755 (patch) | |
tree | 9c258d7d57adb7ba3abea749ca631b35d28fe60d /spec | |
parent | 09beebd7943cf6987df32b742b8dbe719632d20a (diff) | |
parent | c94b607ae6150808a063fc6b2916bda0dc4850ab (diff) |
Merge branch 'create-live-trace-only-if-job-is-complete' into 'master'
Append trace chunk only if job is running
Closes #46383
See merge request gitlab-org/gitlab-ce!18969
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/runner_spec.rb | 16 |
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! |