fluke/devops-service/features/api_v2/image.feature

49 lines
1.4 KiB
Gherkin
Raw Normal View History

2014-07-02 11:45:02 +04:00
@image
2014-06-02 18:31:34 +04:00
Feature: Manage images
Scenario: Get list of all images
When I send GET '/v2.0/images' query
Then response should be '200'
And the Content-Type header should include 'application/json'
And the JSON response should be an array
2014-06-20 12:59:17 +04:00
And response array should contains elements like:
2014-06-02 18:31:34 +04:00
"""
[
{
"provider": "foo_provider",
"name": "foo_name",
"remote_user": "foo_user",
"bootstrap_template": "foo_template",
"id": "foo_id"
}
]
"""
Scenario: Get info for single image
When I send GET '/v2.0/image/ami-83e4bcea' query
Then response should be '200'
And the Content-Type header should include 'application/json'
And the JSON response should be a hash
2014-06-23 13:58:14 +04:00
And response should be JSON object like:
2014-06-02 18:31:34 +04:00
"""
{
"provider": "foo_provider",
"name": "foo_name",
"remote_user": "foo_user",
"bootstrap_template": "foo_template",
"id": "b79994de"
}
"""
2014-07-02 11:45:02 +04:00
Scenario: Get images list without privileges
When I send GET '/v2.0/images' query with user without privileges
Then response should be '401'
Scenario: Get image without privileges
When I send GET '/v2.0/image/ami-83e4bcea' query with user without privileges
Then response should be '401'
Scenario: Get unknown image
When I send GET '/v2.0/image/foo' query
Then response should be '404'