diff options
author | Fabio Pitino <fpitino@gitlab.com> | 2019-06-17 15:22:40 +0100 |
---|---|---|
committer | Fabio Pitino <fpitino@gitlab.com> | 2019-06-17 15:22:40 +0100 |
commit | e63d499fbd8bbeed4da6f67f5ddbbc93573deb73 (patch) | |
tree | 6078c87feba9772d34f3742c325385544d622bc8 | |
parent | cd6fc8b81fc18d438fb696862b6cd7a05ae7b1d5 (diff) | |
download | gitlab-ce-e63d499fbd8bbeed4da6f67f5ddbbc93573deb73.tar.gz |
Ensure duplicate sections collapse
-rw-r--r-- | spec/factories/ci/builds.rb | 4 | ||||
-rw-r--r-- | spec/features/projects/jobs/user_browses_job_spec.rb | 2 | ||||
-rw-r--r-- | spec/fixtures/trace/trace_with_duplicate_sections | 30 |
3 files changed, 33 insertions, 3 deletions
diff --git a/spec/factories/ci/builds.rb b/spec/factories/ci/builds.rb index b12c41cadd3..1a5f8ecaa77 100644 --- a/spec/factories/ci/builds.rb +++ b/spec/factories/ci/builds.rb @@ -228,11 +228,11 @@ FactoryBot.define do end end - trait :trace_with_sections do + trait :trace_with_duplicate_sections do after(:create) do |build, evaluator| trace = File.binread( File.expand_path( - Rails.root.join('spec/fixtures/trace/trace_with_sections'))) + Rails.root.join('spec/fixtures/trace/trace_with_duplicate_sections'))) build.trace.set(trace) end diff --git a/spec/features/projects/jobs/user_browses_job_spec.rb b/spec/features/projects/jobs/user_browses_job_spec.rb index 63b698fb855..90a46c66a1c 100644 --- a/spec/features/projects/jobs/user_browses_job_spec.rb +++ b/spec/features/projects/jobs/user_browses_job_spec.rb @@ -35,7 +35,7 @@ describe 'User browses a job', :js do end context 'when job trace contains sections' do - let!(:build) { create(:ci_build, :success, :trace_with_sections, :coverage, pipeline: pipeline) } + let!(:build) { create(:ci_build, :success, :trace_with_duplicate_sections, :coverage, pipeline: pipeline) } it 'collapses a section' do wait_for_requests diff --git a/spec/fixtures/trace/trace_with_duplicate_sections b/spec/fixtures/trace/trace_with_duplicate_sections new file mode 100644 index 00000000000..7a894e80e38 --- /dev/null +++ b/spec/fixtures/trace/trace_with_duplicate_sections @@ -0,0 +1,30 @@ +[0KRunning with gitlab-runner dev (HEAD) + on kitsune minikube (a21b584f) +[0;m[0;33mWARNING: Namespace is empty, therefore assuming 'default'. +[0;m[0KUsing Kubernetes namespace: default +[0;m[0KUsing Kubernetes executor with image alpine:3.4 ... +[0;msection_start:1506004954:prepare_script
[0KWaiting for pod default/runner-a21b584f-project-1208199-concurrent-0sg03f to be running, status is Pending +Running on runner-a21b584f-project-1208199-concurrent-0sg03f via kitsune.local... +section_end:1506004957:prepare_script
[0Ksection_start:1506004957:get_sources
[0K[32;1mCloning repository...[0;m +Cloning into '/nolith/ci-tests'... +[32;1mChecking out dddd7a6e as master...[0;m +[32;1mSkipping Git submodules setup[0;m +section_end:1506004958:get_sources
[0Ksection_start:1506004958:restore_cache
[0Ksection_end:1506004958:restore_cache
[0Ksection_start:1506004958:download_artifacts
[0Ksection_end:1506004958:download_artifacts
[0Ksection_start:1506004958:build_script
[0K[32;1m$ whoami[0;m +root +section_end:1506004959:build_script
[0Ksection_start:1506004959:after_script
[0Ksection_end:1506004959:after_script
[0Ksection_start:1506004959:archive_cache
[0Ksection_end:1506004959:archive_cache
[0Ksection_start:1506004959:upload_artifacts
[0Ksection_end:1506004959:upload_artifacts
[0K[32;1mJob succeeded +[0;m +[0KRunning with gitlab-runner dev (HEAD) + on kitsune minikube (a21b584f) +[0;m[0;33mWARNING: Namespace is empty, therefore assuming 'default'. +[0;m[0KUsing Kubernetes namespace: default +[0;m[0KUsing Kubernetes executor with image alpine:3.4 ... +[0;msection_start:1506004954:prepare_script
[0KWaiting for pod default/runner-a21b584f-project-1208199-concurrent-0sg03f to be running, status is Pending +Running on runner-a21b584f-project-1208199-concurrent-0sg03f via kitsune.local... +section_end:1506004957:prepare_script
[0Ksection_start:1506004957:get_sources
[0K[32;1mCloning repository...[0;m +Cloning into '/nolith/ci-tests'... +[32;1mChecking out dddd7a6e as master...[0;m +[32;1mSkipping Git submodules setup[0;m +section_end:1506004958:get_sources
[0Ksection_start:1506004958:restore_cache
[0Ksection_end:1506004958:restore_cache
[0Ksection_start:1506004958:download_artifacts
[0Ksection_end:1506004958:download_artifacts
[0Ksection_start:1506004958:build_script
[0K[32;1m$ whoami[0;m +root +section_end:1506004959:build_script
[0Ksection_start:1506004959:after_script
[0Ksection_end:1506004959:after_script
[0Ksection_start:1506004959:archive_cache
[0Ksection_end:1506004959:archive_cache
[0Ksection_start:1506004959:upload_artifacts
[0Ksection_end:1506004959:upload_artifacts
[0K[32;1mJob succeeded +[0;m |