fixed templates

This commit is contained in:
Tim Lianov 2014-07-15 12:15:42 +04:00
parent 2432e2f42c
commit bdf446d67b
4 changed files with 12 additions and 8 deletions

View File

@ -38,7 +38,11 @@ templates = {
"templates/api_v2/10_create/00_filter.feature.erb" => "features/api_v2/10_create/00_filter.feature",
"templates/api_v2/10_create/10_image.feature.erb" => "features/api_v2/10_create/10_image.feature",
"templates/api_v2/10_create/20_project.feature.erb" => "features/api_v2/10_create/20_project.feature",
"templates/api_v2/10_create/30_script.feature.erb" => "features/api_v2/10_create/30_script.feature"
"templates/api_v2/10_create/30_script.feature.erb" => "features/api_v2/10_create/30_script.feature",
#update
"templates/api_v2/20_update/10_image.feature.erb" => "features/api_v2/20_update/10_image.feature"
}
generator = Generator.new
generator.make_tests_config

View File

@ -91,7 +91,7 @@ Feature: Filters
When I send PUT '/v2.0/filter/openstack/image' query with body
"""
[
"<%= @config["openstack"]["image"] %>"
"<%= @config["openstack"]["image"] %>",
]
"""
Then response should be '400'
@ -186,7 +186,7 @@ Feature: Filters
When I send PUT '/v2.0/filter/ec2/image' query with body
"""
[
"<%= @config["ec2"]["image"] %>"
"<%= @config["ec2"]["image"] %>",
]
"""
Then response should be '400'

View File

@ -515,7 +515,7 @@ Feature: Manage images
@ec2
Scenario: Get info for single ec2 image
When I send GET '<%= @config["ec2"]["image"] %>' query
When I send GET '/v2.0/image/<%= @config["ec2"]["image"] %>' query
Then response should be '200'
And the Content-Type header should include 'application/json'
And the JSON response should be an object
@ -532,12 +532,12 @@ Feature: Manage images
@ec2
Scenario: Get info for single ec2 image without headers 'Accept'
When I send GET '<%= @config["ec2"]["image"] %>' query without headers 'Accept'
When I send GET '/v2.0/image/<%= @config["ec2"]["image"] %>' query without headers 'Accept'
Then response should be '406'
@ec2
Scenario: Get ec2 image without privileges
When I send GET '<%= @config["ec2"]["image"] %>' query with user without privileges
When I send GET '/v2.0/image/<%= @config["ec2"]["image"] %>' query with user without privileges
Then response should be '401'
@openstack

View File

@ -13,7 +13,7 @@ Feature: create project
"expires": null,
"provider": "openstack",
"users": [
"<%= @config["user"] %>"
"<%= @config["username"] %>"
],
"flavor": "<%= @config["openstack"]["flavor"] %>",
"image": "<%= @config["openstack"]["image"] %>",
@ -42,7 +42,7 @@ Feature: create project
"expires": null,
"provider": "ec2",
"users": [
"<%= @config["user"] %>"
"<%= @config["username"] %>"
],
"flavor": "<%= @config["ec2"]["flavor"] %>",
"image": "<%= @config["ec2"]["image"] %>",