Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-07-14 00:10:15 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-14 00:10:15 +0300
commita269fb8e7cca24b826dd3f53485641ffce93bbee (patch)
tree81a7c4f56feba26bb6244c8a3a76123533f68aa8 /spec/controllers
parent7e064974b92de60a3ef4642905e8af98a364a7a0 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/projects/pipelines/tests_controller_spec.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/spec/controllers/projects/pipelines/tests_controller_spec.rb b/spec/controllers/projects/pipelines/tests_controller_spec.rb
index 2db54dbe671..deb96cc5bf9 100644
--- a/spec/controllers/projects/pipelines/tests_controller_spec.rb
+++ b/spec/controllers/projects/pipelines/tests_controller_spec.rb
@@ -45,6 +45,21 @@ RSpec.describe Projects::Pipelines::TestsController do
pipeline.job_artifacts.first.update!(expire_at: Date.yesterday)
end
+ it 'renders test suite', :aggregate_failures do
+ get_tests_show_json(build_ids)
+
+ expect(response).to have_gitlab_http_status(:ok)
+ expect(json_response['name']).to eq('test')
+ expect(json_response['total_count']).to eq(3)
+ expect(json_response['test_cases'].size).to eq(3)
+ end
+ end
+
+ context 'when artifacts do not exist' do
+ before do
+ pipeline.job_artifacts.each(&:destroy)
+ end
+
it 'renders not_found errors', :aggregate_failures do
get_tests_show_json(build_ids)
@@ -68,7 +83,6 @@ RSpec.describe Projects::Pipelines::TestsController do
expect(response).to have_gitlab_http_status(:ok)
expect(json_response['name']).to eq('test')
- expect(json_response['artifacts_expired']).to be_falsey
# Each test failure in this pipeline has a matching failure in the default branch
recent_failures = json_response['test_cases'].map { |tc| tc['recent_failures'] }