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>2023-06-02 00:07:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-06-02 00:07:58 +0300
commit3ddb72a5ab59d56cb9e9cb27a5abb92bc5074544 (patch)
tree222afa7cff12916d6de0b8e10cc7cd12be886082 /spec/requests
parent1bafcd6a59a26557e5752dd3ec6fa9e793986036 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/api/graphql/ci/jobs_spec.rb2
-rw-r--r--spec/requests/api/graphql/ci/stages_spec.rb6
-rw-r--r--spec/requests/api/graphql/jobs_query_spec.rb2
-rw-r--r--spec/requests/api/graphql/project/pipeline_spec.rb17
4 files changed, 18 insertions, 9 deletions
diff --git a/spec/requests/api/graphql/ci/jobs_spec.rb b/spec/requests/api/graphql/ci/jobs_spec.rb
index 0d5ac725edd..f237516021d 100644
--- a/spec/requests/api/graphql/ci/jobs_spec.rb
+++ b/spec/requests/api/graphql/ci/jobs_spec.rb
@@ -183,7 +183,7 @@ RSpec.describe 'Query.project.pipeline', feature_category: :continuous_integrati
#{all_graphql_fields_for('CiBuildNeed')}
}
... on CiJob {
- #{all_graphql_fields_for('CiJob')}
+ #{all_graphql_fields_for('CiJob', excluded: %w[aiFailureAnalysis])}
}
}
}
diff --git a/spec/requests/api/graphql/ci/stages_spec.rb b/spec/requests/api/graphql/ci/stages_spec.rb
index f4e1a69d455..2d646a0e1c3 100644
--- a/spec/requests/api/graphql/ci/stages_spec.rb
+++ b/spec/requests/api/graphql/ci/stages_spec.rb
@@ -16,7 +16,7 @@ RSpec.describe 'Query.project.pipeline.stages', feature_category: :continuous_in
let(:fields) do
<<~QUERY
nodes {
- #{all_graphql_fields_for('CiStage')}
+ #{all_graphql_fields_for('CiStage', max_depth: 2)}
}
QUERY
end
@@ -37,7 +37,7 @@ RSpec.describe 'Query.project.pipeline.stages', feature_category: :continuous_in
before_all do
create(:ci_stage, pipeline: pipeline, name: 'deploy')
- create_list(:ci_build, 2, pipeline: pipeline, stage: 'deploy')
+ create(:ci_build, pipeline: pipeline, stage: 'deploy')
end
it_behaves_like 'a working graphql query' do
@@ -58,7 +58,7 @@ RSpec.describe 'Query.project.pipeline.stages', feature_category: :continuous_in
it 'returns up to default limit jobs per stage' do
post_query
- expect(job_nodes.count).to eq(2)
+ expect(job_nodes.count).to eq(1)
end
context 'when the limit is manually set' do
diff --git a/spec/requests/api/graphql/jobs_query_spec.rb b/spec/requests/api/graphql/jobs_query_spec.rb
index 7607aeac6e0..4248a03fa74 100644
--- a/spec/requests/api/graphql/jobs_query_spec.rb
+++ b/spec/requests/api/graphql/jobs_query_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe 'getting job information', feature_category: :continuous_integrat
:jobs, {}, %(
count
nodes {
- #{all_graphql_fields_for(::Types::Ci::JobType, max_depth: 1)}
+ #{all_graphql_fields_for(::Types::Ci::JobType, max_depth: 1, excluded: %w[aiFailureAnalysis])}
})
)
end
diff --git a/spec/requests/api/graphql/project/pipeline_spec.rb b/spec/requests/api/graphql/project/pipeline_spec.rb
index abfdf07c288..fb1489372fc 100644
--- a/spec/requests/api/graphql/project/pipeline_spec.rb
+++ b/spec/requests/api/graphql/project/pipeline_spec.rb
@@ -15,7 +15,7 @@ RSpec.describe 'getting pipeline information nested in a project', feature_categ
let(:path) { %i[project pipeline] }
let(:pipeline_graphql_data) { graphql_data_at(*path) }
let(:depth) { 3 }
- let(:excluded) { %w[job project] } # Project is very expensive, due to the number of fields
+ let(:excluded) { %w[job project jobs] } # Project is very expensive, due to the number of fields
let(:fields) { all_graphql_fields_for('Pipeline', excluded: excluded, max_depth: depth) }
let(:query) do
@@ -82,7 +82,11 @@ RSpec.describe 'getting pipeline information nested in a project', feature_categ
context 'when enough data is requested' do
let(:fields) do
query_graphql_field(:jobs, nil,
- query_graphql_field(:nodes, {}, all_graphql_fields_for('CiJob', max_depth: 3)))
+ query_graphql_field(
+ :nodes, {},
+ all_graphql_fields_for('CiJob', excluded: %w[aiFailureAnalysis], max_depth: 3)
+ )
+ )
end
it 'contains jobs' do
@@ -116,7 +120,12 @@ RSpec.describe 'getting pipeline information nested in a project', feature_categ
let(:fields) do
query_graphql_field(:jobs, { retried: retried_argument },
- query_graphql_field(:nodes, {}, all_graphql_fields_for('CiJob', max_depth: 3)))
+ query_graphql_field(
+ :nodes,
+ {},
+ all_graphql_fields_for('CiJob', excluded: %w[aiFailureAnalysis], max_depth: 3)
+ )
+ )
end
context 'when we filter out retried jobs' do
@@ -177,7 +186,7 @@ RSpec.describe 'getting pipeline information nested in a project', feature_categ
pipeline(iid: $pipelineIID) {
jobs(statuses: [$status]) {
nodes {
- #{all_graphql_fields_for('CiJob', max_depth: 1)}
+ #{all_graphql_fields_for('CiJob', excluded: %w[aiFailureAnalysis], max_depth: 3)}
}
}
}