gitlab-qa 6.21.1 → 6.21.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c989cb7d8d8a3c9eb94835b3a7c274a4632827f3a32998b8f09a4c450a171917
|
4
|
+
data.tar.gz: 130448315ffff85c9be03face027934d3fbd35f1f2d7039c8188622bed464acc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d1471f8093cb11cb9a47ce450b46ea2bf358365a89e3bb4ec0831f10f489a4034b36eea079c6e8ea05876834e039c8ce429298340e2934974932eb5ee483b97
|
7
|
+
data.tar.gz: 06b4bd542227007156a4bd7f16dc5f263ae0054ad985348b256faa9e4412943995351a5ffb4dda78c0b650a9e30579b1b7efbc0cbcc5a36c1fe645daa7d0a091
|
@@ -26,8 +26,7 @@ module Gitlab
|
|
26
26
|
external_url '#{tunnel_gitlab.url}';
|
27
27
|
nginx['listen_port'] = 80;
|
28
28
|
nginx['listen_https'] = false;
|
29
|
-
|
30
|
-
gitlab_rails['initial_root_password'] = '#{Runtime::Env.require_initial_password!}'
|
29
|
+
gitlab_rails['initial_root_password'] = '#{Runtime::Env.require_initial_password!}';
|
31
30
|
|
32
31
|
registry_external_url '#{tunnel_registry.url}';
|
33
32
|
registry_nginx['listen_port'] = 80;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'json'
|
2
2
|
require 'net/http'
|
3
3
|
require 'cgi'
|
4
|
+
require 'time'
|
4
5
|
|
5
6
|
module Gitlab
|
6
7
|
module QA
|
@@ -8,14 +9,10 @@ module Gitlab
|
|
8
9
|
module Test
|
9
10
|
module Sanity
|
10
11
|
# This test checks that the sha_version of a GitLab was authored in
|
11
|
-
# the window defined by `
|
12
|
-
#
|
13
|
-
# the commits in the time window will fit.
|
12
|
+
# the window defined by the `weekday_hours` method.
|
13
|
+
# We perform a single API call to get the commit
|
14
14
|
class Version < Scenario::Template
|
15
|
-
|
16
|
-
COMMITS = 10_000
|
17
|
-
|
18
|
-
def perform(release)
|
15
|
+
def perform(release = 'ce')
|
19
16
|
version = Component::Gitlab.perform do |gitlab|
|
20
17
|
gitlab.release = release
|
21
18
|
gitlab.act do
|
@@ -25,9 +22,9 @@ module Gitlab
|
|
25
22
|
end
|
26
23
|
|
27
24
|
project = "gitlab-org/#{QA::Release.new(release).api_project_name}"
|
28
|
-
commit =
|
25
|
+
commit = api_commit_detail(project, version)
|
29
26
|
|
30
|
-
if commit
|
27
|
+
if commit_within_hours?(commit['created_at'], weekday_hours(commit['created_at']))
|
31
28
|
puts "Found commit #{version} in recent history of #{project}"
|
32
29
|
else
|
33
30
|
puts "Did not find #{version} in recent history of #{project}"
|
@@ -37,14 +34,28 @@ module Gitlab
|
|
37
34
|
|
38
35
|
private
|
39
36
|
|
40
|
-
def
|
37
|
+
def weekday_hours(date_string)
|
38
|
+
case Date.parse(date_string).wday
|
39
|
+
# Sunday
|
40
|
+
when 0
|
41
|
+
48
|
42
|
+
# Monday
|
43
|
+
when 1
|
44
|
+
72
|
45
|
+
else
|
46
|
+
24
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def commit_within_hours?(commit_time_string, hours)
|
51
|
+
Time.at(Time.parse(commit_time_string).utc).to_datetime > Time.at((Time.now - hours * 60 * 60).utc).to_datetime
|
52
|
+
end
|
53
|
+
|
54
|
+
def api_commit_detail(project, commit_id)
|
41
55
|
api = 'https://gitlab.com/api/v4'
|
42
|
-
url = "#{api}/projects/#{CGI.escape(project)}/repository/commits"
|
43
|
-
since = (Time.now - HOURS_AGO * 60 * 60).strftime('%FT%T')
|
56
|
+
url = "#{api}/projects/#{CGI.escape(project)}/repository/commits/#{commit_id}"
|
44
57
|
|
45
|
-
|
46
|
-
uri.query = URI.encode_www_form(since: since, per_page: COMMITS)
|
47
|
-
JSON.parse(Net::HTTP.get(uri))
|
58
|
+
JSON.parse(Net::HTTP.get(URI(url)))
|
48
59
|
end
|
49
60
|
end
|
50
61
|
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: 6.21.
|
4
|
+
version: 6.21.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Grzegorz Bizon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|