summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-04-03 19:47:04 +0200
committerMatija Čupić <matteeyah@gmail.com>2018-04-03 19:47:04 +0200
commit8ac7ea4301eb9c1c90a592e878ac32154f6eb354 (patch)
treef4cf10bb9b0bca48956c086861896c83c9e919d6
parent8a4ec84965bb746c86e7e73aa2f9abb238d85ca6 (diff)
downloadgitlab-ce-8ac7ea4301eb9c1c90a592e878ac32154f6eb354.tar.gz
Set up traces in build show spec
-rw-r--r--spec/views/projects/jobs/show.html.haml_spec.rb17
1 files changed, 9 insertions, 8 deletions
diff --git a/spec/views/projects/jobs/show.html.haml_spec.rb b/spec/views/projects/jobs/show.html.haml_spec.rb
index 6a67da79ec5..64d6ae6d2a3 100644
--- a/spec/views/projects/jobs/show.html.haml_spec.rb
+++ b/spec/views/projects/jobs/show.html.haml_spec.rb
@@ -18,7 +18,7 @@ describe 'projects/jobs/show' do
describe 'environment info in job view' do
context 'job with latest deployment' do
let(:build) do
- create(:ci_build, :success, environment: 'staging')
+ create(:ci_build, :success, :trace_artifact, environment: 'staging')
end
before do
@@ -37,11 +37,11 @@ describe 'projects/jobs/show' do
context 'job with outdated deployment' do
let(:build) do
- create(:ci_build, :success, environment: 'staging', pipeline: pipeline)
+ create(:ci_build, :success, :trace_artifact, environment: 'staging', pipeline: pipeline)
end
let(:second_build) do
- create(:ci_build, :success, environment: 'staging', pipeline: pipeline)
+ create(:ci_build, :success, :trace_artifact, environment: 'staging', pipeline: pipeline)
end
let(:environment) do
@@ -67,7 +67,7 @@ describe 'projects/jobs/show' do
context 'job failed to deploy' do
let(:build) do
- create(:ci_build, :failed, environment: 'staging', pipeline: pipeline)
+ create(:ci_build, :failed, :trace_artifact, environment: 'staging', pipeline: pipeline)
end
let!(:environment) do
@@ -85,7 +85,7 @@ describe 'projects/jobs/show' do
context 'job will deploy' do
let(:build) do
- create(:ci_build, :running, environment: 'staging', pipeline: pipeline)
+ create(:ci_build, :running, :trace_live, environment: 'staging', pipeline: pipeline)
end
context 'when environment exists' do
@@ -133,7 +133,7 @@ describe 'projects/jobs/show' do
context 'job that failed to deploy and environment has not been created' do
let(:build) do
- create(:ci_build, :failed, environment: 'staging', pipeline: pipeline)
+ create(:ci_build, :failed, :trace_artifact, environment: 'staging', pipeline: pipeline)
end
let!(:environment) do
@@ -151,7 +151,7 @@ describe 'projects/jobs/show' do
context 'job that will deploy and environment has not been created' do
let(:build) do
- create(:ci_build, :running, environment: 'staging', pipeline: pipeline)
+ create(:ci_build, :running, :trace_live, environment: 'staging', pipeline: pipeline)
end
let!(:environment) do
@@ -171,8 +171,9 @@ describe 'projects/jobs/show' do
end
context 'when job is running' do
+ let(:build) { create(:ci_build, :trace_live, :running, pipeline: pipeline) }
+
before do
- build.run!
render
end