fluke/devops-service/tests/templates/api_v2/10_create/50_stack.feature.erb
Anton Chuchkalov 356925de49 add more tests
2015-07-08 17:48:19 +04:00

28 lines
930 B
Plaintext

@stack @project
Feature: Stacks
Scenario: Add new stack with user without privileges
When I send POST '/v2.0/stack' query with JSON body with user without privileges
"""
<%= @formatter.json('stack/openstack/valid', spaces: 6) %>
"""
Then response should be '401'
@openstack
Scenario: Add openstack stack
When I send POST '/v2.0/stack' query with JSON body
"""
<%= @formatter.json('stack/openstack/valid', spaces: 4) %>
"""
Then response should be '201'
And the Content-Type header should include 'application/json'
And response should be JSON object like:
"""
{
"id": "test_stack",
"deploy_env": "<%= @config["openstack"]["project"]["env"] %>",
"stack_template": "<%= @config["openstack"]["stack_template"] %>",
"cloud_stack_id": "arn:aws:cloudformation:us-east-1:123456789:stack/MyStack/aaf549a0-a413-11df-adb3-5081b3858e83"
}
"""