gitlab_quality-test_tooling 0.9.1 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/gitlab_quality/test_tooling/report/relate_failure_issue.rb +5 -7
- data/lib/gitlab_quality/test_tooling/report/slow_test_issue.rb +4 -2
- data/lib/gitlab_quality/test_tooling/test_result/json_test_result.rb +4 -0
- data/lib/gitlab_quality/test_tooling/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: fa16a309741761cbce53a73d541cef1c6bb587cd790492cddc02face87e4338b
         | 
| 4 | 
            +
              data.tar.gz: 9cdba5b6c53c83adba07ce9cc0316568b4e8137955fe46faef7705b4b577a5d9
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: dbb5472b2c4a5d70b26806c2467faae4a8b6770a2cf0ddc61f27e2c082f51459f5f8f7a4d640ec93ee3a8da0a126f5effdbae174d7aaf71d2054eddee0854529
         | 
| 7 | 
            +
              data.tar.gz: 98bdef30f3db77c15256ed2ef02e9b3550d8ed6d653e932f0550b35ba3b4f99bd899cedd518dd9a3e0e422ad07e232b2ee1eb1a3abfa2713927312a788c17ad5
         | 
    
        data/Gemfile.lock
    CHANGED
    
    
| @@ -176,12 +176,10 @@ module GitlabQuality | |
| 176 176 | 
             
                    end
         | 
| 177 177 |  | 
| 178 178 | 
             
                    def full_stacktrace(test)
         | 
| 179 | 
            -
                       | 
| 179 | 
            +
                      test.failures.each do |failure|
         | 
| 180 | 
            +
                        next if IGNORED_FAILURES.any? { |e| failure['message'].include?(e) }
         | 
| 180 181 |  | 
| 181 | 
            -
             | 
| 182 | 
            -
                        first_failure['message']
         | 
| 183 | 
            -
                      else
         | 
| 184 | 
            -
                        first_failure['message_lines'].join("\n")
         | 
| 182 | 
            +
                        return failure['message_lines'].empty? ? failure['message'] : failure['message_lines'].join("\n")
         | 
| 185 183 | 
             
                      end
         | 
| 186 184 | 
             
                    end
         | 
| 187 185 |  | 
| @@ -193,9 +191,9 @@ module GitlabQuality | |
| 193 191 | 
             
                    end
         | 
| 194 192 |  | 
| 195 193 | 
             
                    def cleaned_stacktrace_from_test(test)
         | 
| 196 | 
            -
                       | 
| 194 | 
            +
                      test_failure_stacktrace = sanitize_stacktrace(full_stacktrace(test),
         | 
| 197 195 | 
             
                        FAILURE_STACKTRACE_REGEX) || full_stacktrace(test)
         | 
| 198 | 
            -
                      remove_unique_resource_names( | 
| 196 | 
            +
                      remove_unique_resource_names(test_failure_stacktrace)
         | 
| 199 197 | 
             
                    end
         | 
| 200 198 |  | 
| 201 199 | 
             
                    def compare_stack_traces(stack_trace_first, stack_trace_second)
         | 
| @@ -38,9 +38,11 @@ module GitlabQuality | |
| 38 38 |  | 
| 39 39 | 
             
                    def new_issue_description(test)
         | 
| 40 40 | 
             
                      super +
         | 
| 41 | 
            -
                        <<~DESCRIPTION
         | 
| 41 | 
            +
                        <<~DESCRIPTION.chomp
         | 
| 42 42 | 
             
                          Slow tests were detected, please see the [test speed best practices guide](https://docs.gitlab.com/ee/development/testing_guide/best_practices.html#test-speed)
         | 
| 43 43 | 
             
                          to improve them. More context available about this issue in the [top slow tests guide](https://docs.gitlab.com/ee/development/testing_guide/best_practices.html#top-slow-tests).
         | 
| 44 | 
            +
             | 
| 45 | 
            +
                          Add `allowed_to_be_slow: true` to the RSpec test if this is a legit slow test and close the issue.
         | 
| 44 46 | 
             
                        DESCRIPTION
         | 
| 45 47 | 
             
                    end
         | 
| 46 48 |  | 
| @@ -59,7 +61,7 @@ module GitlabQuality | |
| 59 61 | 
             
                    end
         | 
| 60 62 |  | 
| 61 63 | 
             
                    def should_create_slow_issue?(test)
         | 
| 62 | 
            -
                      test.run_time > max_duration_for_test(test)
         | 
| 64 | 
            +
                      !test.allowed_to_be_slow? && test.run_time > max_duration_for_test(test)
         | 
| 63 65 | 
             
                    end
         | 
| 64 66 | 
             
                  end
         | 
| 65 67 | 
             
                end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: gitlab_quality-test_tooling
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.9. | 
| 4 | 
            +
              version: 0.9.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - GitLab Quality
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2023-07- | 
| 11 | 
            +
            date: 2023-07-26 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: climate_control
         |