1. 27 Sep, 2019 37 commits
  2. 26 Sep, 2019 3 commits
    • Thong Kuah's avatar
      Fix frozen string errors in specs · e7fdb8b6
      Thong Kuah authored
      e7fdb8b6
    • Thong Kuah's avatar
      Merge branch '32620-avoid-design-filename-collisions' into 'master' · c9e7ae15
      Thong Kuah authored
      Fix design flaky specs
      
      See merge request gitlab-org/gitlab!17654
      c9e7ae15
    • Luke Duncalfe's avatar
      Avoid design flaky specs · 5c37c7ba
      Luke Duncalfe authored
      Some specs that create a design with a `with_file` trait would fail
      intermittently with a Gitaly error `A file with this name already
      exists`. This signalled that a collision in the design.full_path in
      the spec. The full_path is made from the id of the issue and its name.
      
      The failing tests would fail when a `create(:design, :with_file)` was
      
      - created in a `before` block
      - its issue was created in a `set`
      -  and it was setting a specific filename for the design.
      
      In this situation, if a capybara spec failed once, it would retry again,
      and would try to create a design with the same name and save it against
      the same issue from the last time it ran. This would lead to a full_path
      conflict.
      
      The fix is a combination of:
      - using the default (dynamically sequenced) filenames for designs that
        are generated by FactoryBot where possible
      - if we do set a design that has a `with_file` trait (meaning it will
        create an underlying commit in Gitaly for the design version) then the
        issue must be created at the same time as the design is within the
        test
      
      See https://gitlab.com/gitlab-org/gitlab/issues/32620#note_222564584
      5c37c7ba