summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorsdelano <stephen@opscode.com>2010-08-18 00:41:57 -0700
committerDaniel DeLeo <dan@opscode.com>2010-08-23 17:25:21 -0700
commit8e0a1c97a9a85562cd8d97cf8ab62da964bc7f36 (patch)
treeda236957ec6cf89eff98bbaa1e6b4dcd96005a46 /features
parente1f8742845f93e6120d9eadcfa304d50969aca88 (diff)
downloadchef-8e0a1c97a9a85562cd8d97cf8ab62da964bc7f36.tar.gz
rename/rearrange cookbooks api feature tests
Diffstat (limited to 'features')
-rw-r--r--features/api/cookbooks/delete_cookbooks.feature2
-rw-r--r--features/api/cookbooks/download_cookbooks.feature2
-rw-r--r--features/api/cookbooks/list_cookbooks.feature25
-rw-r--r--features/api/cookbooks/show_cookbooks.feature (renamed from features/api/cookbooks/showlist_cookbooks.feature)18
-rw-r--r--features/api/cookbooks/upload_cookbooks.feature2
5 files changed, 34 insertions, 15 deletions
diff --git a/features/api/cookbooks/delete_cookbooks.feature b/features/api/cookbooks/delete_cookbooks.feature
index 98b8a0227e..e661c08711 100644
--- a/features/api/cookbooks/delete_cookbooks.feature
+++ b/features/api/cookbooks/delete_cookbooks.feature
@@ -1,4 +1,4 @@
-@api @cookbooks
+@api @cookbooks @api_cookbooks_delete
@manage_cookbook
Feature: CRUD cookbooks
diff --git a/features/api/cookbooks/download_cookbooks.feature b/features/api/cookbooks/download_cookbooks.feature
index b9e08d9075..cc3d2d8759 100644
--- a/features/api/cookbooks/download_cookbooks.feature
+++ b/features/api/cookbooks/download_cookbooks.feature
@@ -1,4 +1,4 @@
-@api @cookbooks
+@api @cookbooks @api_cookbooks_download
@manage_cookbook
Feature: CRUD cookbooks
diff --git a/features/api/cookbooks/list_cookbooks.feature b/features/api/cookbooks/list_cookbooks.feature
new file mode 100644
index 0000000000..5a86d34bd4
--- /dev/null
+++ b/features/api/cookbooks/list_cookbooks.feature
@@ -0,0 +1,25 @@
+@api @cookbooks @api_cookbooks_list
+
+Feature: List cookbooks via the REST API
+ In order to know what cookbooks are available
+ As a developer
+ I want to be able to list all cookbooks via the REST API
+
+ Scenario Outline: List all cookbooks
+ Given I am <user_type>
+ And I upload multiple versions of the 'version_test' cookbook
+ When I 'GET' the path '/cookbooks'
+ And the inflated responses key 'attribute_include' should match 'http://.+/cookbooks/attribute_include/0\.1\.0'
+ And the inflated responses key 'deploy' should match 'http://.+/cookbooks/deploy/0\.0\.0'
+ And the inflated responses key 'metadata' should match 'http://.+/cookbooks/metadata/1\.0\.0'
+ And the inflated responses key 'version_test' should match 'http://.+/cookbooks/version_test/0\.2\.0'
+
+ Examples:
+ | user_type |
+ | an administrator |
+ | a non-admin |
+
+ Scenario: List cookbooks with a wrong private key
+ Given I am an administrator
+ When I 'GET' the path '/cookbooks' using a wrong private key
+ Then I should get a '401 "Unauthorized"' exception \ No newline at end of file
diff --git a/features/api/cookbooks/showlist_cookbooks.feature b/features/api/cookbooks/show_cookbooks.feature
index 1b7b486933..dbd6bc47d1 100644
--- a/features/api/cookbooks/showlist_cookbooks.feature
+++ b/features/api/cookbooks/show_cookbooks.feature
@@ -1,11 +1,11 @@
-@api @cookbooks @show_cookbook
-Feature: Show a cookbook via the REST API
- In order to know what the details are for a cookbook
+@api @cookbooks @api_cookbooks_show
+Feature: Show a cookbook via the REST API
+ In order to know what the details are for a cookbook
As a Developer
- I want to show the details for a specific cookbook
-
+ I want to show the details for a specific cookbook
+
@show_cookbook
- Scenario: Show a cookbook
+ Scenario: Show a cookbook
Given I am an administrator
When I fully upload a sandboxed cookbook named 'testcookbook_valid' versioned '0.1.0' with 'testcookbook_valid'
Then I 'GET' the path '/cookbooks/testcookbook_valid/0.1.0'
@@ -27,12 +27,6 @@ Feature: Show a cookbook via the REST API
When I 'GET' the path '/cookbooks/show_cookbook' using a wrong private key
Then I should get a '401 "Unauthorized"' exception
- @list_cookbooks
- Scenario: List cookbooks with a wrong private key
- Given I am an administrator
- When I 'GET' the path '/cookbooks' using a wrong private key
- Then I should get a '401 "Unauthorized"' exception
-
@show_cookbook_negative
Scenario: Listing versions for a non-existent cookbook should fail
Given I am an administrator
diff --git a/features/api/cookbooks/upload_cookbooks.feature b/features/api/cookbooks/upload_cookbooks.feature
index 1a8a1d6a25..2b320b809e 100644
--- a/features/api/cookbooks/upload_cookbooks.feature
+++ b/features/api/cookbooks/upload_cookbooks.feature
@@ -1,4 +1,4 @@
-@api @cookbooks
+@api @cookbooks @api_cookbooks_upload
@manage_cookbook
Feature: CRUD cookbooks