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
99327de2
Commit
99327de2
authored
Aug 23, 2019
by
Mark Lapierre
Committed by
Walmyr Lima e Silva Filho
Aug 23, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fail E2E tests early if template not found via API
parent
681fca60
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
qa/qa/runtime/api/request.rb
qa/qa/runtime/api/request.rb
+4
-0
qa/qa/runtime/fixtures.rb
qa/qa/runtime/fixtures.rb
+11
-2
No files found.
qa/qa/runtime/api/request.rb
View file @
99327de2
...
@@ -12,6 +12,10 @@ module QA
...
@@ -12,6 +12,10 @@ module QA
@session_address
=
Runtime
::
Address
.
new
(
api_client
.
address
,
request_path
)
@session_address
=
Runtime
::
Address
.
new
(
api_client
.
address
,
request_path
)
end
end
def
mask_url
@session_address
.
address
.
sub
(
/private_token=.*/
,
"private_token=[****]"
)
end
def
url
def
url
@session_address
.
address
@session_address
.
address
end
end
...
...
qa/qa/runtime/fixtures.rb
View file @
99327de2
...
@@ -3,10 +3,19 @@
...
@@ -3,10 +3,19 @@
module
QA
module
QA
module
Runtime
module
Runtime
module
Fixtures
module
Fixtures
include
Support
::
Api
TemplateNotFoundError
=
Class
.
new
(
RuntimeError
)
def
fetch_template_from_api
(
api_path
,
key
)
def
fetch_template_from_api
(
api_path
,
key
)
request
=
Runtime
::
API
::
Request
.
new
(
api_client
,
"/templates/
#{
api_path
}
/
#{
key
}
"
)
request
=
Runtime
::
API
::
Request
.
new
(
api_client
,
"/templates/
#{
api_path
}
/
#{
key
}
"
)
get
request
.
url
response
=
get
(
request
.
url
)
json_body
[
:content
]
unless
response
.
code
==
HTTP_STATUS_OK
raise
TemplateNotFoundError
,
"Template at
#{
request
.
mask_url
}
could not be found (
#{
response
.
code
}
): `
#{
response
}
`."
end
parse_body
(
response
)[
:content
]
end
end
private
private
...
...
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