add tests to stack template presets
This commit is contained in:
parent
79183c3a9d
commit
9820ef415f
@ -24,8 +24,8 @@ module Devops
|
|||||||
# - headers :
|
# - headers :
|
||||||
# - Accept: application/json
|
# - Accept: application/json
|
||||||
#
|
#
|
||||||
# * *Returns* : array of strings
|
# * *Returns* : hash
|
||||||
# [ 'postgres_cluster' ]
|
# {id: 'preset id', template_preset_body: 'long body'}
|
||||||
#
|
#
|
||||||
app.get_with_headers "/stack_template_presets/:id", :headers => [:accept], &Devops::Version2_0::Handler::StackTemplatePreset.get_preset
|
app.get_with_headers "/stack_template_presets/:id", :headers => [:accept], &Devops::Version2_0::Handler::StackTemplatePreset.get_preset
|
||||||
|
|
||||||
@ -41,6 +41,8 @@ module Devops
|
|||||||
# - stack_template_id: id of stack template to create
|
# - stack_template_id: id of stack template to create
|
||||||
# - template_attrs: hash with template attributes
|
# - template_attrs: hash with template attributes
|
||||||
#
|
#
|
||||||
|
# TODO: not stack template, but stack itself
|
||||||
|
#
|
||||||
# * *Returns* : created stack template model
|
# * *Returns* : created stack template model
|
||||||
# {
|
# {
|
||||||
# id: 'template id',
|
# id: 'template id',
|
||||||
|
|||||||
@ -72,6 +72,7 @@ templates = {
|
|||||||
|
|
||||||
#list
|
#list
|
||||||
"templates/api_v2/00_list/flavor.feature.erb" => "features/api_v2/00_list/flavor.feature",
|
"templates/api_v2/00_list/flavor.feature.erb" => "features/api_v2/00_list/flavor.feature",
|
||||||
|
"templates/api_v2/00_list/stack_template_preset.feature.erb" => "features/api_v2/00_list/stack_template_preset.feature",
|
||||||
"templates/api_v2/00_list/10_user.feature.erb" => "features/api_v2/00_list/10_user.feature",
|
"templates/api_v2/00_list/10_user.feature.erb" => "features/api_v2/00_list/10_user.feature",
|
||||||
|
|
||||||
#create
|
#create
|
||||||
|
|||||||
@ -0,0 +1,28 @@
|
|||||||
|
@stack_template_preset
|
||||||
|
Feature: stack template preset list
|
||||||
|
|
||||||
|
Scenario: Get list of all stack template presets
|
||||||
|
When I send GET '/v2.0/stack_template_presets' query
|
||||||
|
Then response should be '200'
|
||||||
|
And the Content-Type header should include 'application/json'
|
||||||
|
And the JSON response should be an array
|
||||||
|
And response array should contains elements like:
|
||||||
|
"""
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"id": "test",
|
||||||
|
"template_preset_body": "long body"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
"""
|
||||||
|
|
||||||
|
Scenario: Get information about particular stack template preset
|
||||||
|
When I send GET '/v2.0/stack_template_presets/postgres_cluster' query
|
||||||
|
Then response should be '200'
|
||||||
|
And the Content-Type header should include 'application/json'
|
||||||
|
And response should be JSON object like:
|
||||||
|
"""
|
||||||
|
{
|
||||||
|
"id": "postgres_cluster", "template_preset_body": "long body"
|
||||||
|
}
|
||||||
|
"""
|
||||||
Loading…
Reference in New Issue
Block a user