gitlab-qa 14.10.0 → 14.12.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 +5 -7
- data/.rubocop_todo.yml +0 -1
- data/Gemfile.lock +1 -1
- data/docs/what_tests_can_be_run.md +6 -22
- data/lib/gitlab/qa/component/ai_gateway.rb +71 -1
- data/lib/gitlab/qa/component/chaos.rb +1 -1
- data/lib/gitlab/qa/component/gitaly_cluster.rb +1 -1
- data/lib/gitlab/qa/component/gitlab.rb +1 -0
- data/lib/gitlab/qa/runner.rb +0 -13
- data/lib/gitlab/qa/runtime/env.rb +124 -119
- data/lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb +1 -1
- data/lib/gitlab/qa/scenario/test/instance/airgapped.rb +1 -1
- data/lib/gitlab/qa/scenario/test/instance/image.rb +1 -1
- data/lib/gitlab/qa/scenario/test/instance/relative_url.rb +1 -1
- data/lib/gitlab/qa/scenario/test/instance/repository_storage.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/ai_gateway_base.rb +2 -1
- data/lib/gitlab/qa/scenario/test/integration/client_ssl.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/elasticsearch.rb +2 -2
- data/lib/gitlab/qa/scenario/test/integration/gitlab_pages.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/import.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/integrations.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/jira.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/ldap.rb +3 -3
- data/lib/gitlab/qa/scenario/test/integration/mattermost.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/metrics.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/mtls.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/opensearch.rb +2 -2
- data/lib/gitlab/qa/scenario/test/integration/registry.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/registry_tls.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/registry_with_cdn.rb +2 -2
- data/lib/gitlab/qa/scenario/test/integration/saml.rb +3 -3
- data/lib/gitlab/qa/scenario/test/integration/service_ping_disabled.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/smtp.rb +1 -1
- data/lib/gitlab/qa/scenario/test/integration/suggested_reviewer.rb +1 -1
- data/lib/gitlab/qa/scenario/test/omnibus/update_from_previous.rb +25 -7
- data/lib/gitlab/qa/support/gitlab_upgrade_path.rb +2 -2
- data/lib/gitlab/qa/version.rb +1 -1
- data/rubocop/cop/gitlab/dangerous_interpolation.rb +0 -1
- metadata +2 -5
- data/lib/gitlab/qa/component/telegraf.rb +0 -175
- data/lib/gitlab/qa/scenario/test/instance/staging_geo.rb +0 -32
- data/lib/gitlab/qa/scenario/test/sanity/version.rb +0 -93
@@ -1,93 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'json'
|
4
|
-
require 'net/http'
|
5
|
-
require 'cgi'
|
6
|
-
require 'time'
|
7
|
-
|
8
|
-
module Gitlab
|
9
|
-
module QA
|
10
|
-
module Scenario
|
11
|
-
module Test
|
12
|
-
module Sanity
|
13
|
-
# This test checks that the sha_version of a GitLab was authored in
|
14
|
-
# the window defined by the `weekday_hours` method.
|
15
|
-
# We perform a single API call to get the commit
|
16
|
-
class Version < Scenario::Template
|
17
|
-
SOURCE_MAP = {
|
18
|
-
'git@dev.gitlab.org:gitlab/gitlab-ee.git' => {
|
19
|
-
host: 'dev.gitlab.org',
|
20
|
-
project: 'gitlab/gitlab-ee'
|
21
|
-
},
|
22
|
-
'git@dev.gitlab.org:gitlab/gitlabhq.git' => {
|
23
|
-
host: 'dev.gitlab.org',
|
24
|
-
project: 'gitlab/gitlabhq'
|
25
|
-
},
|
26
|
-
'git@gitlab.com:gitlab-org/gitlab.git' => {
|
27
|
-
host: 'gitlab.com',
|
28
|
-
project: 'gitlab-org/gitlab'
|
29
|
-
},
|
30
|
-
'git@gitlab.com:gitlab-org/gitlab-foss.git' => {
|
31
|
-
host: 'gitlab.com',
|
32
|
-
project: 'gitlab-org/gitlab-foss'
|
33
|
-
}
|
34
|
-
}.freeze
|
35
|
-
|
36
|
-
def perform(release = 'ce')
|
37
|
-
version = Component::Gitlab.perform do |gitlab|
|
38
|
-
gitlab.release = release
|
39
|
-
gitlab.act do
|
40
|
-
pull
|
41
|
-
rails_version
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
project = SOURCE_MAP[version[:source]][:project]
|
46
|
-
host = SOURCE_MAP[version[:source]][:host]
|
47
|
-
sha = version[:sha]
|
48
|
-
commit = api_commit_detail(host, project, sha)
|
49
|
-
|
50
|
-
if commit_within_hours?(commit['created_at'], weekday_hours(commit['created_at']))
|
51
|
-
puts "Found commit #{sha} in recent history of #{project} on #{host}"
|
52
|
-
else
|
53
|
-
puts "Did not find #{sha} in recent history of #{project} on #{host}"
|
54
|
-
exit 1
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
private
|
59
|
-
|
60
|
-
def weekday_hours(date_string)
|
61
|
-
case Date.parse(date_string).wday
|
62
|
-
# Sunday
|
63
|
-
when 0
|
64
|
-
48
|
65
|
-
# Monday
|
66
|
-
when 1
|
67
|
-
72
|
68
|
-
else
|
69
|
-
24
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
def commit_within_hours?(commit_time_string, hours)
|
74
|
-
Time.at(Time.parse(commit_time_string).utc).to_datetime > Time.at((Time.now - (hours * 60 * 60)).utc).to_datetime
|
75
|
-
end
|
76
|
-
|
77
|
-
def api_commit_detail(host, project, sha)
|
78
|
-
url = "https://#{host}/api/v4/projects/#{CGI.escape(project)}/repository/commits/#{sha}"
|
79
|
-
|
80
|
-
if host == 'dev.gitlab.org'
|
81
|
-
Runtime::Env.require_qa_dev_access_token!
|
82
|
-
|
83
|
-
url = "#{url}?private_token=#{Runtime::Env.qa_dev_access_token}"
|
84
|
-
end
|
85
|
-
|
86
|
-
JSON.parse(Net::HTTP.get(URI(url)))
|
87
|
-
end
|
88
|
-
end
|
89
|
-
end
|
90
|
-
end
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|