diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-11 06:08:03 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-11 06:08:03 +0000 |
commit | 18b54e46b77786995acdb1026c2ec35956e33780 (patch) | |
tree | 0ed0d6bf11a0337febb5a30707ad25f426ab760b /spec | |
parent | defc424997d8329613ef3951ab30adf6b3b94f01 (diff) | |
download | gitlab-ce-18b54e46b77786995acdb1026c2ec35956e33780.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
4 files changed, 7 insertions, 5 deletions
diff --git a/spec/requests/api/graphql/project/merge_requests_spec.rb b/spec/requests/api/graphql/project/merge_requests_spec.rb index d69f542cd18..5daec5543c0 100644 --- a/spec/requests/api/graphql/project/merge_requests_spec.rb +++ b/spec/requests/api/graphql/project/merge_requests_spec.rb @@ -96,7 +96,7 @@ RSpec.describe 'getting merge request listings nested in a project' do where(:field, :subfield, :is_connection) do nested_fields_of('MergeRequest').flat_map do |name, field| type = field_type(field) - is_connection = type.name.ends_with?('Connection') + is_connection = type.graphql_name.ends_with?('Connection') type = field_type(type.fields['nodes']) if is_connection type.fields diff --git a/spec/services/ci/create_pipeline_service_spec.rb b/spec/services/ci/create_pipeline_service_spec.rb index 943d70ba142..c39a76ad2fc 100644 --- a/spec/services/ci/create_pipeline_service_spec.rb +++ b/spec/services/ci/create_pipeline_service_spec.rb @@ -466,7 +466,7 @@ RSpec.describe Ci::CreatePipelineService do it 'pull it from Auto-DevOps' do pipeline = execute_service.payload expect(pipeline).to be_auto_devops_source - expect(pipeline.builds.map(&:name)).to match_array(%w[brakeman-sast build code_quality eslint-sast secret_detection semgrep-sast test]) + expect(pipeline.builds.map(&:name)).to match_array(%w[brakeman-sast build code_quality container_scanning eslint-sast secret_detection semgrep-sast test]) end end diff --git a/spec/support/helpers/graphql_helpers.rb b/spec/support/helpers/graphql_helpers.rb index 34383b363d2..db8d45f61ea 100644 --- a/spec/support/helpers/graphql_helpers.rb +++ b/spec/support/helpers/graphql_helpers.rb @@ -250,10 +250,10 @@ module GraphqlHelpers mutation_field = GitlabSchema.mutation.fields[mutation_name] fields = yield if block_given? - fields ||= all_graphql_fields_for(mutation_field.type.to_graphql) + fields ||= all_graphql_fields_for(mutation_field.type.to_type_signature) query = <<~MUTATION - mutation(#{input_variable_name}: #{mutation_field.arguments['input'].type.to_graphql}) { + mutation(#{input_variable_name}: #{mutation_field.arguments['input'].type.to_type_signature}) { #{mutation_name}(input: #{input_variable_name}) { #{fields} } @@ -302,7 +302,7 @@ module GraphqlHelpers def input_variable_name_for_mutation(mutation_name) mutation_name = GraphqlHelpers.fieldnamerize(mutation_name) mutation_field = GitlabSchema.mutation.fields[mutation_name] - input_type = field_type(mutation_field.arguments['input']) + input_type = mutation_field.arguments['input'].type.unwrap.to_type_signature GraphqlHelpers.fieldnamerize(input_type) end diff --git a/spec/support/shared_examples/workers/concerns/git_garbage_collect_methods_shared_examples.rb b/spec/support/shared_examples/workers/concerns/git_garbage_collect_methods_shared_examples.rb index 4751d91efde..77c4a3431e2 100644 --- a/spec/support/shared_examples/workers/concerns/git_garbage_collect_methods_shared_examples.rb +++ b/spec/support/shared_examples/workers/concerns/git_garbage_collect_methods_shared_examples.rb @@ -202,6 +202,8 @@ RSpec.shared_examples 'can collect git garbage' do |update_statistics: true| before do expect(subject).to receive(:get_lease_uuid).and_return(lease_uuid) + + statistics_keys.delete(:repository_size) end it_behaves_like 'it calls Gitaly' |