Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9e5682e6
Commit
9e5682e6
authored
Sep 14, 2020
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a version sanity check QA smoke test
parent
c5307cca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
qa/qa/specs/features/sanity/version_spec.rb
qa/qa/specs/features/sanity/version_spec.rb
+37
-0
No files found.
qa/qa/specs/features/sanity/version_spec.rb
0 → 100644
View file @
9e5682e6
# frozen_string_literal: true
require
'airborne'
module
QA
# This test ensures that the version described by the `DEPLOY_VERSION`
# environment variable is the version actually running.
#
# See https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/1179
RSpec
.
describe
'Version sanity check'
,
:smoke
do
let
(
:api_client
)
{
Runtime
::
API
::
Client
.
new
(
:gitlab
)
}
let
(
:request
)
{
Runtime
::
API
::
Request
.
new
(
api_client
,
'/version'
)
}
it
'is the specified version'
do
# The `DEPLOY_VERSION` variable will only be provided for deploys to the
# `pre` and `release` environments, which only receive packaged releases.
#
# For these releases, `deploy_version` will be a package string (e.g.,
# `13.1.3-ee.0`), and the reported version will be something like
# `13.1.3-ee`, so we only compare the leading SemVer string.
#
# | Package | Version |
# | ---------------- | -------------- |
# | 13.3.5-ee.0 | 13.3.5-ee |
# | 13.3.0-rc42.ee.0 | 13.3.0-rc42-ee |
deploy
=
Runtime
::
Env
.
deploy_version
&
.
gsub
(
/\A(\d+\.\d+\.\d+).*\z/
,
'\1'
)
skip
(
'No deploy version provided'
)
if
deploy
.
nil?
||
deploy
.
empty?
get
request
.
url
expect_status
(
200
)
expect
(
json_body
).
to
have_key
(
:version
)
expect
(
json_body
[
:version
]).
to
start_with
(
deploy
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment