Merge branch 'dev' of http://git.stu.neva.ru/cloudtechlab/devops-service into dev
Conflicts: devops-service/tests/generate_tests.rb
This commit is contained in:
commit
4e7472de3d
@ -41,7 +41,11 @@ templates = {
|
|||||||
"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",
|
||||||
"templates/api_v2/10_create/00_user.feature.erb" => "features/api_v2/10_create/00_user.feature",
|
"templates/api_v2/10_create/00_user.feature.erb" => "features/api_v2/10_create/00_user.feature",
|
||||||
|
|
||||||
|
#update
|
||||||
|
"templates/api_v2/20_update/10_image.feature.erb" => "features/api_v2/20_update/10_image.feature",
|
||||||
|
|
||||||
#delete
|
#delete
|
||||||
|
"templates/api_v2/90_delete/10_script.feature.erb" => "features/api_v2/90_delete/10_script.feature",
|
||||||
"templates/api_v2/90_delete/90_user.feature.erb" => "features/api_v2/90_delete/90_user.feature"
|
"templates/api_v2/90_delete/90_user.feature.erb" => "features/api_v2/90_delete/90_user.feature"
|
||||||
}
|
}
|
||||||
generator = Generator.new
|
generator = Generator.new
|
||||||
|
|||||||
@ -91,7 +91,7 @@ Feature: Filters
|
|||||||
When I send PUT '/v2.0/filter/openstack/image' query with body
|
When I send PUT '/v2.0/filter/openstack/image' query with body
|
||||||
"""
|
"""
|
||||||
[
|
[
|
||||||
"<%= @config["openstack"]["image"] %>"
|
"<%= @config["openstack"]["image"] %>",
|
||||||
]
|
]
|
||||||
"""
|
"""
|
||||||
Then response should be '400'
|
Then response should be '400'
|
||||||
@ -186,7 +186,7 @@ Feature: Filters
|
|||||||
When I send PUT '/v2.0/filter/ec2/image' query with body
|
When I send PUT '/v2.0/filter/ec2/image' query with body
|
||||||
"""
|
"""
|
||||||
[
|
[
|
||||||
"<%= @config["ec2"]["image"] %>"
|
"<%= @config["ec2"]["image"] %>",
|
||||||
]
|
]
|
||||||
"""
|
"""
|
||||||
Then response should be '400'
|
Then response should be '400'
|
||||||
|
|||||||
@ -515,7 +515,7 @@ Feature: Manage images
|
|||||||
|
|
||||||
@ec2
|
@ec2
|
||||||
Scenario: Get info for single ec2 image
|
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'
|
Then response should be '200'
|
||||||
And the Content-Type header should include 'application/json'
|
And the Content-Type header should include 'application/json'
|
||||||
And the JSON response should be an object
|
And the JSON response should be an object
|
||||||
@ -532,12 +532,12 @@ Feature: Manage images
|
|||||||
|
|
||||||
@ec2
|
@ec2
|
||||||
Scenario: Get info for single ec2 image without headers 'Accept'
|
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'
|
Then response should be '406'
|
||||||
|
|
||||||
@ec2
|
@ec2
|
||||||
Scenario: Get ec2 image without privileges
|
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'
|
Then response should be '401'
|
||||||
|
|
||||||
@openstack
|
@openstack
|
||||||
|
|||||||
@ -13,7 +13,7 @@ Feature: create project
|
|||||||
"expires": null,
|
"expires": null,
|
||||||
"provider": "openstack",
|
"provider": "openstack",
|
||||||
"users": [
|
"users": [
|
||||||
"<%= @config["user"] %>"
|
"<%= @config["username"] %>"
|
||||||
],
|
],
|
||||||
"flavor": "<%= @config["openstack"]["flavor"] %>",
|
"flavor": "<%= @config["openstack"]["flavor"] %>",
|
||||||
"image": "<%= @config["openstack"]["image"] %>",
|
"image": "<%= @config["openstack"]["image"] %>",
|
||||||
@ -42,7 +42,7 @@ Feature: create project
|
|||||||
"expires": null,
|
"expires": null,
|
||||||
"provider": "ec2",
|
"provider": "ec2",
|
||||||
"users": [
|
"users": [
|
||||||
"<%= @config["user"] %>"
|
"<%= @config["username"] %>"
|
||||||
],
|
],
|
||||||
"flavor": "<%= @config["ec2"]["flavor"] %>",
|
"flavor": "<%= @config["ec2"]["flavor"] %>",
|
||||||
"image": "<%= @config["ec2"]["image"] %>",
|
"image": "<%= @config["ec2"]["image"] %>",
|
||||||
|
|||||||
@ -0,0 +1,16 @@
|
|||||||
|
@script
|
||||||
|
Feature: Delete script
|
||||||
|
|
||||||
|
Scenario: Delete script with user without privileges
|
||||||
|
When I send DELETE '/v2.0/script/<%= @config["script"]["name"] %>' query with user without privileges
|
||||||
|
Then response should be '401'
|
||||||
|
|
||||||
|
Scenario: Delete script without header 'Accept'
|
||||||
|
When I send DELETE '/v2.0/script/<%= @config["script"]["name"] %>' query without header 'Accept'
|
||||||
|
Then response should be '406'
|
||||||
|
|
||||||
|
Scenario: Delete script with id '<%= @config["script"]["name"] %>'
|
||||||
|
When I send DELETE '/v2.0/script/<%= @config["script"]["name"] %>' query
|
||||||
|
Then response should be '200'
|
||||||
|
And the Content-Type header should include 'application/json'
|
||||||
|
And the JSON response should be an object
|
||||||
Loading…
Reference in New Issue
Block a user