Class: Gitlab::QA::Scenario::Test::Sanity::Version
- Inherits:
-
Gitlab::QA::Scenario::Template
- Object
- Gitlab::QA::Scenario::Template
- Gitlab::QA::Scenario::Test::Sanity::Version
- Defined in:
- lib/gitlab/qa/scenario/test/sanity/version.rb
Overview
This test checks that the sha_version of a GitLab was authored in the window defined by ‘HOURS_AGO`. We perform a single API call, so `COMMITS` needs to be a large enough value that we expect all the commits in the time window will fit.
Constant Summary collapse
- HOURS_AGO =
24
- COMMITS =
10_000
Instance Method Summary collapse
Methods inherited from Gitlab::QA::Scenario::Template
Instance Method Details
#perform(release) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/gitlab/qa/scenario/test/sanity/version.rb', line 18 def perform(release) version = Component::Gitlab.perform do |gitlab| gitlab.release = release gitlab.act do pull sha_version end end project = "gitlab-org/#{Release.new(release).project_name}" commit = recent_commits(project).find { |c| c['id'] == version } if commit puts "Found commit #{version} in recent history of #{project}" else puts "Did not find #{version} in recent history of #{project}" exit 1 end end |