Skip to content

Fix index_projects_by_range_service_spec failure

What does this MR do?

This MR should fix ee/spec/services/elastic/index_projects_by_range_service_spec.rb:8 failure in the 14-2-stable-ee branch

6) Elastic::IndexProjectsByRangeService#execute when without project does not err
     Failure/Error: described_class.new.execute
       (ElasticFullIndexWorker (class)).bulk_perform_async([[1, 1000], [1001, 1054]])
           expected: 0 times with any arguments
           received: 1 time with arguments: ([[1, 1000], [1001, 1054]])
     # ./ee/app/services/elastic/index_projects_by_range_service.rb:21:in `block in execute'
     # ./ee/app/services/elastic/index_projects_by_range_service.rb:20:in `each'
     # ./ee/app/services/elastic/index_projects_by_range_service.rb:20:in `each_slice'
     # ./ee/app/services/elastic/index_projects_by_range_service.rb:20:in `execute'
     # ./ee/spec/services/elastic/index_projects_by_range_service_spec.rb:11:in `block (4 levels) in <top (required)>'
     # ./spec/spec_helper.rb:390:in `block (3 levels) in <top (required)>'
     # ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
     # ./spec/spec_helper.rb:381:in `block (2 levels) in <top (required)>'
     # ./spec/spec_helper.rb:377:in `block (3 levels) in <top (required)>'
     # ./lib/gitlab/application_context.rb:31:in `with_raw_context'
     # ./spec/spec_helper.rb:377:in `block (2 levels) in <top (required)>'

Screenshots or Screencasts (strongly suggested)

How to setup and validate locally (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Dmitry Gruzd

Merge request reports