gitlab-qa 7.4.0 → 7.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +51 -0
- data/docs/run_qa_against_gdk.md +5 -5
- data/docs/what_tests_can_be_run.md +1 -1
- data/gitlab-qa.gemspec +1 -0
- data/lib/gitlab/qa/scenario/test/instance/airgapped.rb +5 -5
- data/lib/gitlab/qa/version.rb +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8251bd9d33c42893133237ccc67188677306e91a30d48cc50aabe5ddbc19daf
|
4
|
+
data.tar.gz: ee371cbd941804d36c6fa9769241d25a1736829a1edce3970ac72175eafe3437
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b94c4940266e586d1edc0782a878b950606fb6a851cfd383b2e6167287eedfb682e71758111bafd7b7920b1a0ffd403e53152407c39b1a12a7605da5bc0c6a22
|
7
|
+
data.tar.gz: da50ac47ec455fba82cbf2e037761e8cf32ce274995d2a11c58f3d7199e3f6e3f71d24b92d2c8c8655cd6974eebada76d81c0b7d66be4433c579312ab01282fb
|
data/.gitlab-ci.yml
CHANGED
@@ -44,6 +44,7 @@ variables:
|
|
44
44
|
QA_ARTIFACTS_DIR: $CI_PROJECT_DIR
|
45
45
|
QA_CAN_TEST_GIT_PROTOCOL_V2: "true"
|
46
46
|
QA_CAN_TEST_PRAEFECT: "false"
|
47
|
+
QA_GENERATE_ALLURE_REPORT: "true"
|
47
48
|
QA_TESTCASES_REPORTING_PROJECT: "gitlab-org/quality/testcases"
|
48
49
|
QA_TESTCASE_SESSIONS_PROJECT: "gitlab-org/quality/testcase-sessions"
|
49
50
|
# QA_DEFAULT_BRANCH is the default branch name of the instance under test.
|
@@ -153,7 +154,10 @@ rspec:
|
|
153
154
|
variables:
|
154
155
|
QA_RSPEC_TAGS: "--tag quarantine"
|
155
156
|
|
157
|
+
# Do not generate allure report since it always adds a failed test to the report. The job runs a test where 1 example would always fail and assert exit code via custom script bin/expect_exit_code_and_text
|
156
158
|
ce:sanity-framework:
|
159
|
+
variables:
|
160
|
+
QA_GENERATE_ALLURE_REPORT: "false"
|
157
161
|
script:
|
158
162
|
- ./bin/expect_exit_code_and_text "bundle exec exe/gitlab-qa Test::Instance::Image ${RELEASE:=CE} -- --tag framework" 1 "2 examples, 1 failure"
|
159
163
|
extends:
|
@@ -162,6 +166,8 @@ ce:sanity-framework:
|
|
162
166
|
- .ce-qa
|
163
167
|
|
164
168
|
ee:sanity-framework:
|
169
|
+
variables:
|
170
|
+
QA_GENERATE_ALLURE_REPORT: "false"
|
165
171
|
script:
|
166
172
|
- ./bin/expect_exit_code_and_text "bundle exec exe/gitlab-qa Test::Instance::Image ${RELEASE:=EE} -- --tag framework" 1 "2 examples, 1 failure"
|
167
173
|
extends:
|
@@ -1030,6 +1036,51 @@ ee:jira-quarantine:
|
|
1030
1036
|
variables:
|
1031
1037
|
QA_SCENARIO: "Test::Integration::Jira"
|
1032
1038
|
|
1039
|
+
generate-allure-report:
|
1040
|
+
image:
|
1041
|
+
name: ${GITLAB_DEPENDENCY_PROXY}andrcuns/allure-report-publisher:0.3.3
|
1042
|
+
entrypoint: [""]
|
1043
|
+
stage: report
|
1044
|
+
variables:
|
1045
|
+
GIT_STRATEGY: none
|
1046
|
+
STORAGE_CREDENTIALS: $QA_ALLURE_REPORT_GCS_CREDENTIALS
|
1047
|
+
GITLAB_AUTH_TOKEN: $GITLAB_QA_MR_ALLURE_REPORT_TOKEN
|
1048
|
+
# Override allure variables for upstream triggers
|
1049
|
+
ALLURE_PROJECT_PATH: $TOP_UPSTREAM_SOURCE_PROJECT
|
1050
|
+
ALLURE_MERGE_REQUEST_IID: $TOP_UPSTREAM_MERGE_REQUEST_IID
|
1051
|
+
ALLURE_COMMIT_SHA: $TOP_UPSTREAM_SOURCE_SHA
|
1052
|
+
# Override default before script and don't push cache
|
1053
|
+
cache:
|
1054
|
+
policy: pull
|
1055
|
+
before_script:
|
1056
|
+
- echo "Generating and publishing allure test report"
|
1057
|
+
script:
|
1058
|
+
- |
|
1059
|
+
allure-report-publisher upload gcs \
|
1060
|
+
--results-glob="gitlab-qa-run-*/**/allure-results/*" \
|
1061
|
+
--bucket="gitlab-qa-allure-reports" \
|
1062
|
+
--prefix="${ALLURE_JOB_NAME}/${TOP_UPSTREAM_SOURCE_REF:=$CI_COMMIT_REF_SLUG}" \
|
1063
|
+
--update-pr="comment" \
|
1064
|
+
--copy-latest \
|
1065
|
+
--ignore-missing-results \
|
1066
|
+
--color
|
1067
|
+
allow_failure: true
|
1068
|
+
rules:
|
1069
|
+
# Don't run report generation on release pipelines
|
1070
|
+
- if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_PATH == "gitlab-org/gitlab-qa" && $RELEASE == null'
|
1071
|
+
changes: ["lib/**/version.rb"]
|
1072
|
+
when: never
|
1073
|
+
- if: '$CI_COMMIT_TAG'
|
1074
|
+
when: never
|
1075
|
+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" || ($CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH)'
|
1076
|
+
variables:
|
1077
|
+
ALLURE_JOB_NAME: gitlab-qa
|
1078
|
+
when: always
|
1079
|
+
- if: '$TOP_UPSTREAM_SOURCE_PROJECT && $TOP_UPSTREAM_SOURCE_SHA'
|
1080
|
+
variables:
|
1081
|
+
ALLURE_JOB_NAME: package-and-qa
|
1082
|
+
when: always
|
1083
|
+
|
1033
1084
|
# This job requires the `GITLAB_QA_ACCESS_TOKEN` and `GITLAB_QA_DEV_ACCESS_TOKEN`
|
1034
1085
|
# variable to be passed when triggered.
|
1035
1086
|
staging:
|
data/docs/run_qa_against_gdk.md
CHANGED
@@ -37,18 +37,18 @@ make a few changes to your `gdk/gitlab/config/gitlab.yml` file.
|
|
37
37
|
# build the QA image first
|
38
38
|
# In gdk/gitlab:
|
39
39
|
$ docker build -t gitlab/gitlab-ce-qa:your-custom-tag --file ./qa/Dockerfile ./
|
40
|
-
|
41
|
-
# Note: You will also need a corresponding GitLab image.
|
40
|
+
|
41
|
+
# Note: You will also need a corresponding GitLab image.
|
42
42
|
# For example, if you haven't changed any application code (e.g., no new elements), you could tag the current nightly build:
|
43
43
|
$ docker tag gitlab/gitlab-ce:nightly gitlab/gitlab-ce:your-custom-tag
|
44
44
|
|
45
45
|
# Then in gitlab-qa:
|
46
46
|
$ exe/gitlab-qa Test::Instance::Any gitlab/gitlab-ce:your-custom-tag http://192.168.0.12:3000 -- qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb
|
47
47
|
```
|
48
|
-
|
48
|
+
|
49
49
|
**Note:** The hostname of the URL provided to `gitlab-qa` must match the hostname configured for GDK.
|
50
50
|
If they do not match, a test will be signed out when it visits a page directly because the hostname of the URL visited will be different from the hostname that was used when signing in.
|
51
|
-
|
51
|
+
|
52
52
|
### Running EE tests
|
53
53
|
|
54
54
|
When running EE tests you'll need to have a license available. GitLab engineers can [request a license](https://about.gitlab.com/handbook/developer-onboarding/#working-on-gitlab-ee).
|
@@ -68,7 +68,7 @@ Run from the `gdk-ee/gitlab/qa` directory with GDK primary and secondary running
|
|
68
68
|
$ bundle exec bin/qa QA::EE::Scenario::Test::Geo --primary-address http://localhost:3001 --secondary-address http://localhost:3002 --primary-name primary --secondary-name secondary --without-setup
|
69
69
|
|
70
70
|
# Run in visible Chrome browser
|
71
|
-
$
|
71
|
+
$ WEBDRIVER_HEADLESS=0 bundle exec bin/qa QA::EE::Scenario::Test::Geo --primary-address http://localhost:3001 --secondary-address http://localhost:3002 --primary-name primary --secondary-name secondary --without-setup
|
72
72
|
```
|
73
73
|
|
74
74
|
### QA Tool support on macOS
|
@@ -59,7 +59,7 @@ All environment variables used by GitLab QA should be defined in [`lib/gitlab/qa
|
|
59
59
|
| `EE_LICENSE` |- | Enterprise Edition license. | No|
|
60
60
|
| `QA_ARTIFACTS_DIR` |`/tmp/gitlab-qa`| Path to a directory where artifacts (logs and screenshots) for failing tests will be saved. | No|
|
61
61
|
| `DOCKER_HOST` |`http://localhost`| Docker host to run tests against. | No|
|
62
|
-
| `
|
62
|
+
| `WEBDRIVER_HEADLESS` |- | When running locally, set to `false` to allow Chrome tests to be visible - watch your tests being run. | No|
|
63
63
|
| `QA_ADDITIONAL_REPOSITORY_STORAGE` |- | The name of additional, non-default storage to be used with tests tagged `repository_storage`, run via the `Test::Instance::RepositoryStorage` scenario. Note: Admin access is required to change repository storage. | No|
|
64
64
|
| `QA_PRAEFECT_REPOSITORY_STORAGE` |- | The name of repository storage using Praefect. Note: Admin access is required to change repository storage. | No|
|
65
65
|
| `QA_COOKIES` |- | Optionally set to "cookie1=value;cookie2=value" in order to add a cookie to every request. This can be used to set the canary cookie by setting it to "gitlab_canary=true". | No|
|
data/gitlab-qa.gemspec
CHANGED
@@ -28,6 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.add_development_dependency 'rspec', '~> 3.7'
|
29
29
|
spec.add_development_dependency 'rubocop', '~> 0.82.0'
|
30
30
|
spec.add_development_dependency 'rubocop-rspec', '~> 1.36'
|
31
|
+
spec.add_development_dependency 'solargraph', '~> 0.41'
|
31
32
|
spec.add_development_dependency 'webmock', '3.7.0'
|
32
33
|
spec.add_runtime_dependency 'activesupport', '~> 6.0.2'
|
33
34
|
spec.add_runtime_dependency 'gitlab', '~> 4.16.1'
|
@@ -12,8 +12,8 @@ module Gitlab
|
|
12
12
|
@commands = <<~AIRGAP_AND_VERIFY_COMMAND.split(/\n+/)
|
13
13
|
# Should not fail before airgapping due to eg. DNS failure
|
14
14
|
# Ping and wget check
|
15
|
-
apt-get update && apt-get install -y iptables
|
16
|
-
|
15
|
+
apt-get update && apt-get install -y iptables nmap
|
16
|
+
nmap -sT #{gitlab_ip} -p 80 && (echo \"Regular connectivity nmap check passed.\" && exit 0) || (echo \"Regular connectivity nmap check failed.\" && exit 1)
|
17
17
|
echo "Checking regular connectivity..." \
|
18
18
|
&& wget --retry-connrefused --waitretry=1 --read-timeout=15 --timeout=10 -t 2 http://registry.gitlab.com > /dev/null 2>&1 \
|
19
19
|
&& (echo "Regular connectivity wget check passed." && exit 0) || (echo "Regular connectivity wget check failed." && exit 1)
|
@@ -32,9 +32,9 @@ module Gitlab
|
|
32
32
|
iptables -A INPUT -p tcp -m tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT
|
33
33
|
|
34
34
|
# Should now fail to ping and wget, port 80 should be open
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
nmap -sT #{gitlab_ip} -p 80 && (echo \"Airgapped network faulty. Connectivity nmap check failed.\" && exit 1) || (echo \"Connectivity nmap check passed.\" && exit 0)
|
36
|
+
nmap -sT 127.0.0.1 -p 22 && (echo "Airgapped connectivity port 22 check passed." && exit 0) || (echo "Airgapped connectivity port 22 check failed." && exit 1)
|
37
|
+
nmap -sT 10 127.0.0.1 -p 80 && (echo "Airgapped connectivity port 80 check passed." && exit 0) || (echo "Airgapped connectivity port 80 check failed." && exit 1)
|
38
38
|
echo "Checking airgapped connectivity..." \
|
39
39
|
&& wget --retry-connrefused --waitretry=1 --read-timeout=15 --timeout=10 -t 2 http://registry.gitlab.com > /dev/null 2>&1 \
|
40
40
|
&& (echo "Airgapped network faulty. Connectivity wget check failed." && exit 1) || (echo "Airgapped network confirmed. Connectivity wget check passed." && exit 0)
|
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: 7.
|
4
|
+
version: 7.5.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: 2021-
|
11
|
+
date: 2021-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '1.36'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: solargraph
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0.41'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0.41'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: webmock
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -355,7 +369,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
355
369
|
- !ruby/object:Gem::Version
|
356
370
|
version: '0'
|
357
371
|
requirements: []
|
358
|
-
rubygems_version: 3.1.
|
372
|
+
rubygems_version: 3.1.6
|
359
373
|
signing_key:
|
360
374
|
specification_version: 4
|
361
375
|
summary: Integration tests for GitLab
|