Remove flaky CE spec for FileSizeLimitCheck CE

What does this MR do and why?

Removes the flaky CE spec for FileSizeLimitCheck#validate! in spec/lib/gitlab/checks/file_size_limit_check_spec.rb.

In !187085 (merged), the validate! logic was moved from CE to EE, and the CE method was turned into a stub returning nil. A CE spec was added to verify this behavior:

it 'is a stub that does nothing' do
  expect(file_size_check.validate!).to be_nil
end

This test is flaky because prepend_mod at the bottom of the CE class means the EE validate! override is always active in the test environment. The CE stub is never actually called. The EE validate! returns nil only when no file size limit is configured, but when a preceding test (in randomized order) leaks state that sets a limit, the EE method returns true instead, causing the failure

Since the real validate! logic is already fully covered in ee/spec/lib/ee/gitlab/checks/file_size_limit_check_spec.rb, this CE spec is redundant and safe to remove.

References

Comment: 528d1fb3 (comment 3112102564)

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Emma Park

Merge request reports

Loading