gitlab-qa 8.10.2 → 8.11.0
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/.gitlab/ci/jobs/integrations.gitlab-ci.yml +5 -5
 - data/Gemfile.lock +1 -1
 - data/docs/what_tests_can_be_run.md +2 -2
 - data/lib/gitlab/qa/component/base.rb +4 -0
 - data/lib/gitlab/qa/component/mock_server.rb +21 -0
 - data/lib/gitlab/qa/scenario/test/integration/import.rb +83 -0
 - data/lib/gitlab/qa/version.rb +1 -1
 - metadata +4 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 8e671dd38d183bc823c72bb1a4a7d597912b0d31e6169487d7733069bdcbadb8
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: e851a0dcaede0a6c33627bf4a0a794d9f083b05080fb79e7246c1e0c9bb31058
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 91d4ae5bb59dfad449f73bf8b4f84cb8d8f22447611f8a19fa81bd0d2c9800c6a4ff42adfa95f4dad491d011d2f85144088e5bf91a420d02ed1fa9dd5b7ed592
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 4b658660ca1c90e1764270f4c0b7b8e36210120a8a80b5c298e0d381e55ddb163a93cb2123e81d9bb461584b930fb45640dac6cbdd807513c017727f2f23ac23
         
     | 
| 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
             
     | 
| 
      
 1 
     | 
    
         
            +
            ee:integrations:
         
     | 
| 
       2 
2 
     | 
    
         
             
              extends:
         
     | 
| 
       3 
     | 
    
         
            -
                - .rules: 
     | 
| 
      
 3 
     | 
    
         
            +
                - .rules:ee-never-when-triggered-by-feature-flag-definition-change
         
     | 
| 
       4 
4 
     | 
    
         
             
                - .test
         
     | 
| 
       5 
5 
     | 
    
         
             
                - .high-capacity
         
     | 
| 
       6 
     | 
    
         
            -
                - . 
     | 
| 
      
 6 
     | 
    
         
            +
                - .ee-variables
         
     | 
| 
       7 
7 
     | 
    
         
             
                - .rspec-report-opts
         
     | 
| 
       8 
8 
     | 
    
         
             
              variables:
         
     | 
| 
       9 
9 
     | 
    
         
             
                QA_SCENARIO: "Test::Integration::Integrations"
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
      
 11 
     | 
    
         
            +
            ee:integrations-quarantine:
         
     | 
| 
       12 
12 
     | 
    
         
             
              extends:
         
     | 
| 
       13 
     | 
    
         
            -
                -  
     | 
| 
      
 13 
     | 
    
         
            +
                - ee:integrations
         
     | 
| 
       14 
14 
     | 
    
         
             
                - .quarantine
         
     | 
    
        data/Gemfile.lock
    CHANGED
    
    
| 
         @@ -670,7 +670,7 @@ $ export EE_LICENSE=$(cat /path/to/GitLab.gitlab_license) 
     | 
|
| 
       670 
670 
     | 
    
         
             
            $ gitlab-qa Test::Integration::Jira EE
         
     | 
| 
       671 
671 
     | 
    
         
             
            ```
         
     | 
| 
       672 
672 
     | 
    
         | 
| 
       673 
     | 
    
         
            -
            ### `Test::Integration::Integrations CE|<full image address>`
         
     | 
| 
      
 673 
     | 
    
         
            +
            ### `Test::Integration::Integrations CE|EE|<full image address>`
         
     | 
| 
       674 
674 
     | 
    
         | 
| 
       675 
675 
     | 
    
         
             
            This scenario is intended to test the different integrations that a GitLab instance can offer, such as WebHooks to an external service, Jenkins, etc.
         
     | 
| 
       676 
676 
     | 
    
         | 
| 
         @@ -681,7 +681,7 @@ container is spun up and tests are run from it by running the 
     | 
|
| 
       681 
681 
     | 
    
         
             
            Example:
         
     | 
| 
       682 
682 
     | 
    
         | 
| 
       683 
683 
     | 
    
         
             
            ```
         
     | 
| 
       684 
     | 
    
         
            -
            $ gitlab-qa Test::Integration::Integrations  
     | 
| 
      
 684 
     | 
    
         
            +
            $ gitlab-qa Test::Integration::Integrations EE
         
     | 
| 
       685 
685 
     | 
    
         
             
            ```
         
     | 
| 
       686 
686 
     | 
    
         | 
| 
       687 
687 
     | 
    
         
             
            ### `Test::Instance::Any CE|EE|<full image address>:nightly|latest|any_tag http://your.instance.gitlab`
         
     | 
| 
         @@ -43,6 +43,10 @@ module Gitlab 
     | 
|
| 
       43 
43 
     | 
    
         
             
                      raise NotImplementedError, "#{self.class.name} must specify a docker image tag as DOCKER_IMAGE_TAG"
         
     | 
| 
       44 
44 
     | 
    
         
             
                    end
         
     | 
| 
       45 
45 
     | 
    
         | 
| 
      
 46 
     | 
    
         
            +
                    def start_instance
         
     | 
| 
      
 47 
     | 
    
         
            +
                      instance_no_teardown
         
     | 
| 
      
 48 
     | 
    
         
            +
                    end
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
       46 
50 
     | 
    
         
             
                    def instance(skip_teardown: false)
         
     | 
| 
       47 
51 
     | 
    
         
             
                      instance_no_teardown do
         
     | 
| 
       48 
52 
     | 
    
         
             
                        yield self if block_given?
         
     | 
| 
         @@ -0,0 +1,21 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module Gitlab
         
     | 
| 
      
 4 
     | 
    
         
            +
              module QA
         
     | 
| 
      
 5 
     | 
    
         
            +
                module Component
         
     | 
| 
      
 6 
     | 
    
         
            +
                  class MockServer < Base
         
     | 
| 
      
 7 
     | 
    
         
            +
                    DOCKER_IMAGE = "thiht/smocker"
         
     | 
| 
      
 8 
     | 
    
         
            +
                    DOCKER_IMAGE_TAG = "0.18.2"
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                    def initialize
         
     | 
| 
      
 11 
     | 
    
         
            +
                      super
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                      @ports = %w[8080 8081]
         
     | 
| 
      
 14 
     | 
    
         
            +
                      @name = "smocker-server"
         
     | 
| 
      
 15 
     | 
    
         
            +
                    end
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
                    attr_reader :name
         
     | 
| 
      
 18 
     | 
    
         
            +
                  end
         
     | 
| 
      
 19 
     | 
    
         
            +
                end
         
     | 
| 
      
 20 
     | 
    
         
            +
              end
         
     | 
| 
      
 21 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,83 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            require "parallel"
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            module Gitlab
         
     | 
| 
      
 6 
     | 
    
         
            +
              module QA
         
     | 
| 
      
 7 
     | 
    
         
            +
                module Scenario
         
     | 
| 
      
 8 
     | 
    
         
            +
                  module Test
         
     | 
| 
      
 9 
     | 
    
         
            +
                    module Integration
         
     | 
| 
      
 10 
     | 
    
         
            +
                      # Scenario type for testing importers
         
     | 
| 
      
 11 
     | 
    
         
            +
                      #
         
     | 
| 
      
 12 
     | 
    
         
            +
                      # In addition to main gitlab instance, starts another gitlab instance to act as source
         
     | 
| 
      
 13 
     | 
    
         
            +
                      #   and mock server to replace all other possible import sources
         
     | 
| 
      
 14 
     | 
    
         
            +
                      #
         
     | 
| 
      
 15 
     | 
    
         
            +
                      class Import < Scenario::Template
         
     | 
| 
      
 16 
     | 
    
         
            +
                        def initialize
         
     | 
| 
      
 17 
     | 
    
         
            +
                          @source_gitlab = Component::Gitlab.new
         
     | 
| 
      
 18 
     | 
    
         
            +
                          @target_gitlab = Component::Gitlab.new
         
     | 
| 
      
 19 
     | 
    
         
            +
                          @mock_server = Component::MockServer.new
         
     | 
| 
      
 20 
     | 
    
         
            +
                          @network = "test"
         
     | 
| 
      
 21 
     | 
    
         
            +
                        end
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                        attr_reader :source_gitlab, :target_gitlab, :mock_server, :network
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
                        def perform(release, *rspec_args)
         
     | 
| 
      
 26 
     | 
    
         
            +
                          start_mock_server
         
     | 
| 
      
 27 
     | 
    
         
            +
                          start_gitlab_instances(release)
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
                          run_specs(rspec_args)
         
     | 
| 
      
 30 
     | 
    
         
            +
                        ensure
         
     | 
| 
      
 31 
     | 
    
         
            +
                          mock_server.teardown
         
     | 
| 
      
 32 
     | 
    
         
            +
                          target_gitlab.teardown
         
     | 
| 
      
 33 
     | 
    
         
            +
                          source_gitlab.teardown
         
     | 
| 
      
 34 
     | 
    
         
            +
                        end
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
                        private
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
                        # Start mock server instance
         
     | 
| 
      
 39 
     | 
    
         
            +
                        #
         
     | 
| 
      
 40 
     | 
    
         
            +
                        # @return [void]
         
     | 
| 
      
 41 
     | 
    
         
            +
                        def start_mock_server
         
     | 
| 
      
 42 
     | 
    
         
            +
                          mock_server.tap do |server|
         
     | 
| 
      
 43 
     | 
    
         
            +
                            server.network = network
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
                            server.start_instance
         
     | 
| 
      
 46 
     | 
    
         
            +
                          end
         
     | 
| 
      
 47 
     | 
    
         
            +
                        end
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
                        # Start gitlab instance
         
     | 
| 
      
 50 
     | 
    
         
            +
                        #
         
     | 
| 
      
 51 
     | 
    
         
            +
                        # @param [Gitlab::QA::Release] release
         
     | 
| 
      
 52 
     | 
    
         
            +
                        # @return [void]
         
     | 
| 
      
 53 
     | 
    
         
            +
                        def start_gitlab_instances(release)
         
     | 
| 
      
 54 
     | 
    
         
            +
                          ::Parallel.each([source_gitlab, target_gitlab], in_threads: 2) do |gitlab_instance|
         
     | 
| 
      
 55 
     | 
    
         
            +
                            gitlab_instance.tap do |gitlab|
         
     | 
| 
      
 56 
     | 
    
         
            +
                              gitlab.network = network
         
     | 
| 
      
 57 
     | 
    
         
            +
                              gitlab.release = release
         
     | 
| 
      
 58 
     | 
    
         
            +
                              gitlab.seed_admin_token = true
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
                              gitlab.start_instance
         
     | 
| 
      
 61 
     | 
    
         
            +
                            end
         
     | 
| 
      
 62 
     | 
    
         
            +
                          end
         
     | 
| 
      
 63 
     | 
    
         
            +
                        end
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
                        # Run tests
         
     | 
| 
      
 66 
     | 
    
         
            +
                        #
         
     | 
| 
      
 67 
     | 
    
         
            +
                        # @param [Array] rspec_args
         
     | 
| 
      
 68 
     | 
    
         
            +
                        # @return [void]
         
     | 
| 
      
 69 
     | 
    
         
            +
                        def run_specs(rspec_args)
         
     | 
| 
      
 70 
     | 
    
         
            +
                          Component::Specs.perform do |specs|
         
     | 
| 
      
 71 
     | 
    
         
            +
                            specs.suite = "Test::Integration::Import"
         
     | 
| 
      
 72 
     | 
    
         
            +
                            specs.release = target_gitlab.release
         
     | 
| 
      
 73 
     | 
    
         
            +
                            specs.network = network
         
     | 
| 
      
 74 
     | 
    
         
            +
                            specs.env = { "QA_IMPORT_SOURCE_URL" => source_gitlab.address }
         
     | 
| 
      
 75 
     | 
    
         
            +
                            specs.args = [target_gitlab.address, *rspec_args]
         
     | 
| 
      
 76 
     | 
    
         
            +
                          end
         
     | 
| 
      
 77 
     | 
    
         
            +
                        end
         
     | 
| 
      
 78 
     | 
    
         
            +
                      end
         
     | 
| 
      
 79 
     | 
    
         
            +
                    end
         
     | 
| 
      
 80 
     | 
    
         
            +
                  end
         
     | 
| 
      
 81 
     | 
    
         
            +
                end
         
     | 
| 
      
 82 
     | 
    
         
            +
              end
         
     | 
| 
      
 83 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/gitlab/qa/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: gitlab-qa
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 8. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 8.11.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - GitLab Quality
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2022-11- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2022-11-15 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: climate_control
         
     | 
| 
         @@ -332,6 +332,7 @@ files: 
     | 
|
| 
       332 
332 
     | 
    
         
             
            - lib/gitlab/qa/component/ldap.rb
         
     | 
| 
       333 
333 
     | 
    
         
             
            - lib/gitlab/qa/component/mail_hog.rb
         
     | 
| 
       334 
334 
     | 
    
         
             
            - lib/gitlab/qa/component/minio.rb
         
     | 
| 
      
 335 
     | 
    
         
            +
            - lib/gitlab/qa/component/mock_server.rb
         
     | 
| 
       335 
336 
     | 
    
         
             
            - lib/gitlab/qa/component/opensearch.rb
         
     | 
| 
       336 
337 
     | 
    
         
             
            - lib/gitlab/qa/component/postgresql.rb
         
     | 
| 
       337 
338 
     | 
    
         
             
            - lib/gitlab/qa/component/preprod.rb
         
     | 
| 
         @@ -405,6 +406,7 @@ files: 
     | 
|
| 
       405 
406 
     | 
    
         
             
            - lib/gitlab/qa/scenario/test/integration/gitaly_cluster.rb
         
     | 
| 
       406 
407 
     | 
    
         
             
            - lib/gitlab/qa/scenario/test/integration/gitlab_pages.rb
         
     | 
| 
       407 
408 
     | 
    
         
             
            - lib/gitlab/qa/scenario/test/integration/group_saml.rb
         
     | 
| 
      
 409 
     | 
    
         
            +
            - lib/gitlab/qa/scenario/test/integration/import.rb
         
     | 
| 
       408 
410 
     | 
    
         
             
            - lib/gitlab/qa/scenario/test/integration/instance_saml.rb
         
     | 
| 
       409 
411 
     | 
    
         
             
            - lib/gitlab/qa/scenario/test/integration/integrations.rb
         
     | 
| 
       410 
412 
     | 
    
         
             
            - lib/gitlab/qa/scenario/test/integration/jira.rb
         
     |