openshift-origin-controller 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/COPYRIGHT +1 -0
- data/Gemfile +4 -0
- data/LICENSE +12 -0
- data/README.md +3 -0
- data/Rakefile +9 -0
- data/app/controllers/app_events_controller.rb +115 -0
- data/app/controllers/application_templates_controller.rb +19 -0
- data/app/controllers/applications_controller.rb +214 -0
- data/app/controllers/base_controller.rb +367 -0
- data/app/controllers/cartridges_controller.rb +48 -0
- data/app/controllers/descriptors_controller.rb +23 -0
- data/app/controllers/dns_resolvable_controller.rb +35 -0
- data/app/controllers/domains_controller.rb +156 -0
- data/app/controllers/emb_cart_controller.rb +276 -0
- data/app/controllers/emb_cart_events_controller.rb +52 -0
- data/app/controllers/environment_controller.rb +11 -0
- data/app/controllers/estimates_controller.rb +71 -0
- data/app/controllers/gear_groups_controller.rb +53 -0
- data/app/controllers/gears_controller.rb +70 -0
- data/app/controllers/keys_controller.rb +96 -0
- data/app/controllers/legacy_broker_controller.rb +510 -0
- data/app/controllers/quickstarts_controller.rb +29 -0
- data/app/controllers/user_controller.rb +38 -0
- data/app/helpers/cartridge_helper.rb +25 -0
- data/app/helpers/legacy_broker_helper.rb +21 -0
- data/app/helpers/user_action_logger.rb +38 -0
- data/app/models/application.rb +1718 -0
- data/app/models/application_template.rb +27 -0
- data/app/models/cartridge_cache.rb +51 -0
- data/app/models/cloud_user.rb +334 -0
- data/app/models/component_instance.rb +228 -0
- data/app/models/connection_endpoint.rb +10 -0
- data/app/models/district.rb +210 -0
- data/app/models/domain.rb +234 -0
- data/app/models/gear.rb +376 -0
- data/app/models/group_instance.rb +306 -0
- data/app/models/key.rb +20 -0
- data/app/models/legacy_reply.rb +15 -0
- data/app/models/legacy_request.rb +126 -0
- data/app/models/link.rb +11 -0
- data/app/models/message.rb +10 -0
- data/app/models/name_server_cache.rb +46 -0
- data/app/models/optional_param.rb +12 -0
- data/app/models/param.rb +13 -0
- data/app/models/remote_job.rb +57 -0
- data/app/models/rest_application.rb +126 -0
- data/app/models/rest_application10.rb +106 -0
- data/app/models/rest_application12.rb +124 -0
- data/app/models/rest_application_estimate.rb +12 -0
- data/app/models/rest_application_template.rb +20 -0
- data/app/models/rest_cartridge10.rb +41 -0
- data/app/models/rest_cartridge11.rb +151 -0
- data/app/models/rest_domain.rb +43 -0
- data/app/models/rest_domain10.rb +42 -0
- data/app/models/rest_estimates.rb +16 -0
- data/app/models/rest_gear.rb +14 -0
- data/app/models/rest_gear_group.rb +26 -0
- data/app/models/rest_key.rb +24 -0
- data/app/models/rest_reply.rb +31 -0
- data/app/models/rest_user.rb +43 -0
- data/app/models/result_io.rb +67 -0
- data/app/models/usage_record.rb +37 -0
- data/app/models/validators/app_validator.rb +30 -0
- data/app/models/validators/key_validator.rb +30 -0
- data/app/models/validators/namespace_validator.rb +18 -0
- data/config/routes.rb +36 -0
- data/lib/controller_engine.rb +7 -0
- data/lib/openshift-origin-controller.rb +14 -0
- data/lib/openshift/application_container_proxy.rb +241 -0
- data/lib/openshift/auth_service.rb +101 -0
- data/lib/openshift/data_store.rb +33 -0
- data/lib/openshift/dns_service.rb +41 -0
- data/lib/openshift/mongo_data_store.rb +671 -0
- data/openshift-origin-controller.gemspec +42 -0
- data/rubygem-openshift-origin-controller.spec +274 -0
- data/test/cucumber/application-estimate.feature +25 -0
- data/test/cucumber/cartridge-10gen-mms-agent.feature +28 -0
- data/test/cucumber/cartridge-cron.feature +32 -0
- data/test/cucumber/cartridge-haproxy.feature +31 -0
- data/test/cucumber/cartridge-jenkins-build.feature +12 -0
- data/test/cucumber/cartridge-jenkins-client.feature +10 -0
- data/test/cucumber/cartridge-lifecycle-diy.feature +21 -0
- data/test/cucumber/cartridge-lifecycle-jbossas.feature +61 -0
- data/test/cucumber/cartridge-lifecycle-jbosseap.feature +61 -0
- data/test/cucumber/cartridge-lifecycle-jbossews10.feature +61 -0
- data/test/cucumber/cartridge-lifecycle-jenkins.feature +41 -0
- data/test/cucumber/cartridge-lifecycle-nodejs.feature +59 -0
- data/test/cucumber/cartridge-lifecycle-perl.feature +40 -0
- data/test/cucumber/cartridge-lifecycle-php.feature +106 -0
- data/test/cucumber/cartridge-lifecycle-python.feature +40 -0
- data/test/cucumber/cartridge-lifecycle-ruby18.feature +49 -0
- data/test/cucumber/cartridge-lifecycle-ruby19.feature +41 -0
- data/test/cucumber/cartridge-mongodb.feature +31 -0
- data/test/cucumber/cartridge-mysql.feature +30 -0
- data/test/cucumber/cartridge-php.feature +14 -0
- data/test/cucumber/cartridge-phpmyadmin.feature +32 -0
- data/test/cucumber/cartridge-postgresql.feature +32 -0
- data/test/cucumber/cartridge-runtime-extended-db.feature +64 -0
- data/test/cucumber/cartridge-runtime-extended-jboss.feature +24 -0
- data/test/cucumber/cartridge-runtime-extended-nodejs.feature +21 -0
- data/test/cucumber/cartridge-runtime-extended-perl.feature +18 -0
- data/test/cucumber/cartridge-runtime-extended-php.feature +19 -0
- data/test/cucumber/cartridge-runtime-extended-python.feature +18 -0
- data/test/cucumber/cartridge-runtime-extended-ruby.feature +22 -0
- data/test/cucumber/cartridge-runtime-standard-diy.feature +6 -0
- data/test/cucumber/cartridge-runtime-standard-jbossas.feature +7 -0
- data/test/cucumber/cartridge-runtime-standard-jbosseap.feature +7 -0
- data/test/cucumber/cartridge-runtime-standard-jbossews10.feature +7 -0
- data/test/cucumber/cartridge-runtime-standard-jenkins.feature +8 -0
- data/test/cucumber/cartridge-runtime-standard-nodejs.feature +7 -0
- data/test/cucumber/cartridge-runtime-standard-perl.feature +6 -0
- data/test/cucumber/cartridge-runtime-standard-php.feature +6 -0
- data/test/cucumber/cartridge-runtime-standard-python.feature +6 -0
- data/test/cucumber/cartridge-runtime-standard-ruby.feature +19 -0
- data/test/cucumber/cartridge-switchyard.feature +36 -0
- data/test/cucumber/descriptor.feature +40 -0
- data/test/cucumber/embedded.feature +44 -0
- data/test/cucumber/idler.feature +75 -0
- data/test/cucumber/misc/descriptor/manifest.yml +22 -0
- data/test/cucumber/misc/php/db_test.php +21 -0
- data/test/cucumber/openshift-node.feature +21 -0
- data/test/cucumber/rest-application-templates.feature +31 -0
- data/test/cucumber/rest-applications.feature +431 -0
- data/test/cucumber/rest-cartridge-types.feature +16 -0
- data/test/cucumber/rest-domains.feature +276 -0
- data/test/cucumber/rest-gears.feature +38 -0
- data/test/cucumber/rest-keys.feature +247 -0
- data/test/cucumber/rest-quickstarts.feature +27 -0
- data/test/cucumber/rest-workflow.feature +64 -0
- data/test/cucumber/step_definitions/api_steps.rb +369 -0
- data/test/cucumber/step_definitions/application-estimate-steps.rb +51 -0
- data/test/cucumber/step_definitions/application_steps.rb +215 -0
- data/test/cucumber/step_definitions/cartridge-10gen-mms-agent_steps.rb +11 -0
- data/test/cucumber/step_definitions/cartridge-cron_steps.rb +51 -0
- data/test/cucumber/step_definitions/cartridge-haproxy_steps.rb +30 -0
- data/test/cucumber/step_definitions/cartridge-jenkins_steps.rb +93 -0
- data/test/cucumber/step_definitions/cartridge-lifecycle-nodejs_steps.rb +30 -0
- data/test/cucumber/step_definitions/cartridge-mongodb_steps.rb +60 -0
- data/test/cucumber/step_definitions/cartridge-mysql_steps.rb +56 -0
- data/test/cucumber/step_definitions/cartridge-php_steps.rb +72 -0
- data/test/cucumber/step_definitions/cartridge-postgresql_steps.rb +59 -0
- data/test/cucumber/step_definitions/cartridge-switchyard_steps.rb +29 -0
- data/test/cucumber/step_definitions/client_steps.rb +12 -0
- data/test/cucumber/step_definitions/descriptor_step.rb +32 -0
- data/test/cucumber/step_definitions/idler_steps.rb +37 -0
- data/test/cucumber/step_definitions/node_steps.rb +203 -0
- data/test/cucumber/step_definitions/runtime_steps.rb +547 -0
- data/test/cucumber/step_definitions/runtime_url_steps.rb +46 -0
- data/test/cucumber/step_definitions/trap-user-extended_steps.rb +14 -0
- data/test/cucumber/step_definitions/trap-user_steps.rb +58 -0
- data/test/cucumber/support/00_setup_helper.rb +106 -0
- data/test/cucumber/support/app_helper.rb +243 -0
- data/test/cucumber/support/assertions.rb +52 -0
- data/test/cucumber/support/command_helper.rb +453 -0
- data/test/cucumber/support/dns_helper.rb +54 -0
- data/test/cucumber/support/env.rb +5 -0
- data/test/cucumber/support/process_helper.rb +44 -0
- data/test/cucumber/support/runtime_support.rb +440 -0
- data/test/cucumber/support/unused.rb +27 -0
- data/test/cucumber/support/user_helper.rb +37 -0
- data/test/cucumber/trap-user-extended.feature +53 -0
- data/test/cucumber/trap-user.feature +34 -0
- data/test/ddns/1.168.192-rev.db.init +13 -0
- data/test/ddns/HOWTO.txt +207 -0
- data/test/ddns/Kexample.com.+157+06142.key +1 -0
- data/test/ddns/Kexample.com.+157+06142.private +7 -0
- data/test/ddns/authconfig.rb +14 -0
- data/test/ddns/example.com.db.init +23 -0
- data/test/ddns/example.com.key +4 -0
- data/test/ddns/named.ca +52 -0
- data/test/ddns/named.conf +48 -0
- data/test/ddns/named.empty +10 -0
- data/test/ddns/named.localhost +10 -0
- data/test/ddns/named.loopback +11 -0
- data/test/ddns/named.rfc1912.zones +42 -0
- data/test/ddns/named.root.key +5 -0
- data/test/ddns/named_service.rb +127 -0
- data/test/unit/bind_dns_service_test.rb +167 -0
- data/test/unit/broker_auth_test.rb +28 -0
- metadata +545 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@broker_api
|
|
2
|
+
@broker_api1
|
|
3
|
+
Feature: cartridge types
|
|
4
|
+
As an API client
|
|
5
|
+
In order to do things with application templates
|
|
6
|
+
I want to List and Show cartridge types without authenticating
|
|
7
|
+
|
|
8
|
+
Scenario Outline: List cartridge types
|
|
9
|
+
Given I accept "<format>"
|
|
10
|
+
When I send an unauthenticated GET request to "/cartridges"
|
|
11
|
+
Then the response should be "200"
|
|
12
|
+
And the response should be a list of "cartridges"
|
|
13
|
+
|
|
14
|
+
Scenarios:
|
|
15
|
+
|format|
|
|
16
|
+
|JSON|
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
@broker_api
|
|
2
|
+
@broker_api3
|
|
3
|
+
Feature: domains
|
|
4
|
+
As an API client
|
|
5
|
+
In order to do things with domains
|
|
6
|
+
I want to List, Create, Retrieve, Update and Delete domains
|
|
7
|
+
|
|
8
|
+
Scenario Outline: List domains
|
|
9
|
+
Given a new user
|
|
10
|
+
And I accept "<format>"
|
|
11
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
|
12
|
+
Then the response should be "201"
|
|
13
|
+
When I send a GET request to "/domains"
|
|
14
|
+
Then the response should be "200"
|
|
15
|
+
|
|
16
|
+
Scenarios:
|
|
17
|
+
| format |
|
|
18
|
+
| JSON |
|
|
19
|
+
| XML |
|
|
20
|
+
|
|
21
|
+
Scenario Outline: Create domain
|
|
22
|
+
Given a new user
|
|
23
|
+
And I accept "<format>"
|
|
24
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
|
25
|
+
Then the response should be "201"
|
|
26
|
+
And the response should be a "domain" with attributes "id=api<random>"
|
|
27
|
+
|
|
28
|
+
Scenarios:
|
|
29
|
+
| format |
|
|
30
|
+
| JSON |
|
|
31
|
+
| XML |
|
|
32
|
+
|
|
33
|
+
Scenario Outline: Create domain with blank, missing, too long and invalid id
|
|
34
|
+
Given a new user
|
|
35
|
+
And I accept "<format>"
|
|
36
|
+
When I send a POST request to "/domains" with the following:"id="
|
|
37
|
+
Then the response should be "422"
|
|
38
|
+
And the error message should have "field=id&severity=error&exit_code=106"
|
|
39
|
+
When I send a POST request to "/domains" with the following:""
|
|
40
|
+
Then the response should be "422"
|
|
41
|
+
And the error message should have "field=id&severity=error&exit_code=106"
|
|
42
|
+
When I send a POST request to "/domains" with the following:"id=cucum?ber"
|
|
43
|
+
Then the response should be "422"
|
|
44
|
+
And the error message should have "field=id&severity=error&exit_code=106"
|
|
45
|
+
When I send a POST request to "/domains" with the following:"id=namethatistoolongtobeavaliddomain"
|
|
46
|
+
Then the response should be "422"
|
|
47
|
+
And the error message should have "field=id&severity=error&exit_code=106"
|
|
48
|
+
|
|
49
|
+
Scenarios:
|
|
50
|
+
| format |
|
|
51
|
+
| JSON |
|
|
52
|
+
| XML |
|
|
53
|
+
|
|
54
|
+
Scenario Outline: Retrieve domain
|
|
55
|
+
Given a new user
|
|
56
|
+
And I accept "<format>"
|
|
57
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
|
58
|
+
Then the response should be "201"
|
|
59
|
+
When I send a GET request to "/domains/api<random>"
|
|
60
|
+
Then the response should be "200"
|
|
61
|
+
And the response should be a "domain" with attributes "id=api<random>"
|
|
62
|
+
|
|
63
|
+
Scenarios:
|
|
64
|
+
| format |
|
|
65
|
+
| JSON |
|
|
66
|
+
| XML |
|
|
67
|
+
|
|
68
|
+
Scenario Outline: Retrieve non-existent domain
|
|
69
|
+
Given a new user
|
|
70
|
+
And I accept "<format>"
|
|
71
|
+
When I send a GET request to "/domains/api<random>"
|
|
72
|
+
Then the response should be "404"
|
|
73
|
+
And the error message should have "severity=error&exit_code=127"
|
|
74
|
+
|
|
75
|
+
Scenarios:
|
|
76
|
+
| format |
|
|
77
|
+
| JSON |
|
|
78
|
+
| XML |
|
|
79
|
+
|
|
80
|
+
Scenario Outline: Update domain
|
|
81
|
+
Given a new user
|
|
82
|
+
And I accept "<format>"
|
|
83
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
|
84
|
+
Then the response should be "201"
|
|
85
|
+
When I send a PUT request to "/domains/api<random>" with the following:"id=apiX<random>"
|
|
86
|
+
Then the response should be "200"
|
|
87
|
+
And the response should be a "domain" with attributes "id=apiX<random>"
|
|
88
|
+
|
|
89
|
+
Scenarios:
|
|
90
|
+
| format |
|
|
91
|
+
| JSON |
|
|
92
|
+
| XML |
|
|
93
|
+
|
|
94
|
+
Scenario Outline: Update domain with blank, missing, too long and invalid id
|
|
95
|
+
Given a new user
|
|
96
|
+
And I accept "<format>"
|
|
97
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
|
98
|
+
Then the response should be "201"
|
|
99
|
+
When I send a PUT request to "/domains/api<random>" with the following:"id="
|
|
100
|
+
Then the response should be "422"
|
|
101
|
+
And the error message should have "field=id&severity=error&exit_code=106"
|
|
102
|
+
When I send a PUT request to "/domains/api<random>" with the following:""
|
|
103
|
+
Then the response should be "422"
|
|
104
|
+
And the error message should have "field=id&severity=error&exit_code=106"
|
|
105
|
+
When I send a PUT request to "/domains/api<random>" with the following:"id=api?"
|
|
106
|
+
Then the response should be "422"
|
|
107
|
+
And the error message should have "field=id&severity=error&exit_code=106"
|
|
108
|
+
When I send a PUT request to "/domains/api<random>" with the following:"id=namethatistoolongtobeavaliddomain"
|
|
109
|
+
Then the response should be "422"
|
|
110
|
+
And the error message should have "field=id&severity=error&exit_code=106"
|
|
111
|
+
When I send a GET request to "/domains/api<random>"
|
|
112
|
+
Then the response should be "200"
|
|
113
|
+
And the response should be a "domain" with attributes "id=api<random>"
|
|
114
|
+
|
|
115
|
+
Scenarios:
|
|
116
|
+
| format |
|
|
117
|
+
| JSON |
|
|
118
|
+
| XML |
|
|
119
|
+
|
|
120
|
+
Scenario Outline: Update non-existent domain
|
|
121
|
+
Given a new user
|
|
122
|
+
And I accept "<format>"
|
|
123
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
|
124
|
+
Then the response should be "201"
|
|
125
|
+
When I send a PUT request to "/domains/apiX<random>" with the following:"id=apiY<random>"
|
|
126
|
+
Then the response should be "404"
|
|
127
|
+
And the error message should have "severity=error&exit_code=127"
|
|
128
|
+
|
|
129
|
+
Scenarios:
|
|
130
|
+
| format |
|
|
131
|
+
| JSON |
|
|
132
|
+
| XML |
|
|
133
|
+
|
|
134
|
+
Scenario Outline: Update domain with applications
|
|
135
|
+
Given a new user
|
|
136
|
+
And I accept "<format>"
|
|
137
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
|
138
|
+
Then the response should be "201"
|
|
139
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=php-5.3"
|
|
140
|
+
Then the response should be "201"
|
|
141
|
+
When I send a PUT request to "/domains/api<random>" with the following:"id=apiX<random>"
|
|
142
|
+
Then the response should be "200"
|
|
143
|
+
And the response should be a "domain" with attributes "id=apiX<random>"
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
Scenarios:
|
|
147
|
+
| format |
|
|
148
|
+
| JSON |
|
|
149
|
+
| XML |
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
Scenario Outline: Update the domain of another user
|
|
153
|
+
Given a new user
|
|
154
|
+
And I accept "<format>"
|
|
155
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
|
156
|
+
Then the response should be "201"
|
|
157
|
+
Given a new user
|
|
158
|
+
|
|
159
|
+
When I send a GET request to "/domains/api<random>"
|
|
160
|
+
Then the response should be "404"
|
|
161
|
+
When I send a PUT request to "/domains/api<random>" with the following:"id=apiX<random>"
|
|
162
|
+
Then the response should be "404"
|
|
163
|
+
And the error message should have "severity=error&exit_code=127"
|
|
164
|
+
|
|
165
|
+
Scenarios:
|
|
166
|
+
| format |
|
|
167
|
+
| JSON |
|
|
168
|
+
| XML |
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
Scenario Outline: Delete domain
|
|
172
|
+
Given a new user
|
|
173
|
+
And I accept "<format>"
|
|
174
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
|
175
|
+
Then the response should be "201"
|
|
176
|
+
When I send a DELETE request to "/domains/api<random>"
|
|
177
|
+
Then the response should be "204"
|
|
178
|
+
When I send a GET request to "/domains/api<random>"
|
|
179
|
+
Then the response should be "404"
|
|
180
|
+
|
|
181
|
+
Scenarios:
|
|
182
|
+
| format |
|
|
183
|
+
| JSON |
|
|
184
|
+
| XML |
|
|
185
|
+
|
|
186
|
+
Scenario Outline: Delete non-existent domain
|
|
187
|
+
Given a new user
|
|
188
|
+
And I accept "<format>"
|
|
189
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
|
190
|
+
Then the response should be "201"
|
|
191
|
+
When I send a DELETE request to "/domains/apiX<random>"
|
|
192
|
+
Then the response should be "404"
|
|
193
|
+
And the error message should have "severity=error&exit_code=127"
|
|
194
|
+
|
|
195
|
+
Scenarios:
|
|
196
|
+
| format |
|
|
197
|
+
| JSON |
|
|
198
|
+
| XML |
|
|
199
|
+
|
|
200
|
+
Scenario Outline: Delete domain of another user
|
|
201
|
+
Given a new user
|
|
202
|
+
And I accept "<format>"
|
|
203
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
|
204
|
+
Then the response should be "201"
|
|
205
|
+
Given a new user
|
|
206
|
+
|
|
207
|
+
When I send a DELETE request to "/domains/api<random>"
|
|
208
|
+
Then the response should be "404"
|
|
209
|
+
|
|
210
|
+
Scenarios:
|
|
211
|
+
| format |
|
|
212
|
+
| JSON |
|
|
213
|
+
| XML |
|
|
214
|
+
|
|
215
|
+
Scenario Outline: Delete domain with existing applications
|
|
216
|
+
Given a new user
|
|
217
|
+
And I accept "<format>"
|
|
218
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
|
219
|
+
Then the response should be "201"
|
|
220
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=php-5.3"
|
|
221
|
+
Then the response should be "201"
|
|
222
|
+
When I send a DELETE request to "/domains/api<random>"
|
|
223
|
+
Then the response should be "400"
|
|
224
|
+
And the error message should have "severity=error&exit_code=128"
|
|
225
|
+
When I send a DELETE request to "/domains/api<random>/applications/app"
|
|
226
|
+
Then the response should be "204"
|
|
227
|
+
|
|
228
|
+
Scenarios:
|
|
229
|
+
| format |
|
|
230
|
+
| JSON |
|
|
231
|
+
| XML |
|
|
232
|
+
|
|
233
|
+
Scenario Outline: Force Delete domain with existing applications
|
|
234
|
+
Given a new user
|
|
235
|
+
And I accept "<format>"
|
|
236
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
|
237
|
+
Then the response should be "201"
|
|
238
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=php-5.3"
|
|
239
|
+
Then the response should be "201"
|
|
240
|
+
When I send a DELETE request to "/domains/api<random>?force=true"
|
|
241
|
+
Then the response should be "204"
|
|
242
|
+
|
|
243
|
+
Scenarios:
|
|
244
|
+
| format |
|
|
245
|
+
| JSON |
|
|
246
|
+
| XML |
|
|
247
|
+
|
|
248
|
+
Scenario Outline: Create more than one domain
|
|
249
|
+
Given a new user
|
|
250
|
+
And I accept "<format>"
|
|
251
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
|
252
|
+
Then the response should be "201"
|
|
253
|
+
And the response should be a "domain" with attributes "id=api<random>"
|
|
254
|
+
When I send a POST request to "/domains" with the following:"id=apiX<random>"
|
|
255
|
+
Then the response should be "409"
|
|
256
|
+
|
|
257
|
+
Scenarios:
|
|
258
|
+
| format |
|
|
259
|
+
| JSON |
|
|
260
|
+
| XML |
|
|
261
|
+
|
|
262
|
+
Scenario Outline: Create duplicate domain
|
|
263
|
+
Given a new user
|
|
264
|
+
And I accept "<format>"
|
|
265
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
|
266
|
+
Then the response should be "201"
|
|
267
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
|
268
|
+
Then the response should be "422"
|
|
269
|
+
And the error message should have "field=id&severity=error&exit_code=103"
|
|
270
|
+
|
|
271
|
+
Scenarios:
|
|
272
|
+
| format |
|
|
273
|
+
| JSON |
|
|
274
|
+
| XML |
|
|
275
|
+
|
|
276
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
@broker_api
|
|
2
|
+
@broker_api4
|
|
3
|
+
Feature: gear-groups
|
|
4
|
+
As an API client
|
|
5
|
+
I want to check the application state on each of the gears within each gear group
|
|
6
|
+
|
|
7
|
+
Scenario Outline: Check application state on gear with xml
|
|
8
|
+
Given a new user
|
|
9
|
+
And I accept "<format>"
|
|
10
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
|
11
|
+
Then the response should be "201"
|
|
12
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=php-5.3"
|
|
13
|
+
Then the response should be "201"
|
|
14
|
+
|
|
15
|
+
When I send a GET request to "/domains/api<random>/applications/app/gear_groups"
|
|
16
|
+
Then the response should be a "gear-group/gears/gear" with attributes "state=started"
|
|
17
|
+
|
|
18
|
+
When I send a POST request to "/domains/api<random>/applications/app/events" with the following:"event=stop"
|
|
19
|
+
Then the response should be "200"
|
|
20
|
+
When I send a GET request to "/domains/api<random>/applications/app/gear_groups"
|
|
21
|
+
Then the response should be a "gear-group/gears/gear" with attributes "state=stopped"
|
|
22
|
+
|
|
23
|
+
When I send a POST request to "/domains/api<random>/applications/app/events" with the following:"event=start"
|
|
24
|
+
Then the response should be "200"
|
|
25
|
+
When I send a GET request to "/domains/api<random>/applications/app/gear_groups"
|
|
26
|
+
Then the response should be a "gear-group/gears/gear" with attributes "state=started"
|
|
27
|
+
|
|
28
|
+
When I send a POST request to "/domains/api<random>/applications/app/events" with the following:"event=restart"
|
|
29
|
+
Then the response should be "200"
|
|
30
|
+
When I send a GET request to "/domains/api<random>/applications/app/gear_groups"
|
|
31
|
+
Then the response should be a "gear-group/gears/gear" with attributes "state=started"
|
|
32
|
+
|
|
33
|
+
When I send a DELETE request to "/domains/api<random>/applications/app"
|
|
34
|
+
Then the response should be "204"
|
|
35
|
+
|
|
36
|
+
Scenarios:
|
|
37
|
+
| format |
|
|
38
|
+
| XML |
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
@broker_api
|
|
2
|
+
@broker_api1
|
|
3
|
+
Feature: keys
|
|
4
|
+
As an API client
|
|
5
|
+
In order to do things with keys
|
|
6
|
+
I want to List, Create, Retrieve, Update and Delete keys
|
|
7
|
+
|
|
8
|
+
Scenario Outline: List keys
|
|
9
|
+
Given a new user
|
|
10
|
+
And I accept "<format>"
|
|
11
|
+
When I send a GET request to "/user/keys"
|
|
12
|
+
Then the response should be "200"
|
|
13
|
+
|
|
14
|
+
Scenarios:
|
|
15
|
+
| format |
|
|
16
|
+
| JSON |
|
|
17
|
+
| XML |
|
|
18
|
+
|
|
19
|
+
Scenario Outline: Create key
|
|
20
|
+
Given a new user
|
|
21
|
+
And I accept "<format>"
|
|
22
|
+
When I send a POST request to "/user/keys" with the following:"name=api&type=ssh-rsa&content=XYZ123567"
|
|
23
|
+
Then the response should be "201"
|
|
24
|
+
And the response should be a "key" with attributes "name=api&type=ssh-rsa&content=XYZ123567"
|
|
25
|
+
|
|
26
|
+
Scenarios:
|
|
27
|
+
| format |
|
|
28
|
+
| JSON |
|
|
29
|
+
| XML |
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
Scenario Outline: Create key with with blank, missing and invalid content
|
|
33
|
+
Given a new user
|
|
34
|
+
And I accept "<format>"
|
|
35
|
+
When I send a POST request to "/user/keys" with the following:"name=api&type=ssh-rsa&content=XYZ123=567[dfhhfl]"
|
|
36
|
+
Then the response should be "422"
|
|
37
|
+
And the error message should have "field=content&severity=error&exit_code=108"
|
|
38
|
+
When I send a POST request to "/user/keys" with the following:"name=api&type=ssh-rsa&content="
|
|
39
|
+
Then the response should be "422"
|
|
40
|
+
And the error message should have "field=content&severity=error&exit_code=108"
|
|
41
|
+
When I send a POST request to "/user/keys" with the following:"name=api&type=ssh-rsa"
|
|
42
|
+
Then the response should be "422"
|
|
43
|
+
And the error message should have "field=content&severity=error&exit_code=108"
|
|
44
|
+
|
|
45
|
+
Scenarios:
|
|
46
|
+
| format |
|
|
47
|
+
| JSON |
|
|
48
|
+
| XML |
|
|
49
|
+
|
|
50
|
+
Scenario Outline: Create key with with blank, missing, too long and invalid name
|
|
51
|
+
Given a new user
|
|
52
|
+
And I accept "<format>"
|
|
53
|
+
When I send a POST request to "/user/keys" with the following:"name=cucum?*ber&type=ssh-rsa&content=XYZ123"
|
|
54
|
+
Then the response should be "422"
|
|
55
|
+
And the error message should have "field=name&severity=error&exit_code=117"
|
|
56
|
+
When I send a POST request to "/user/keys" with the following:"name=&type=ssh-rsa&content=XYZ123"
|
|
57
|
+
Then the response should be "422"
|
|
58
|
+
And the error message should have "field=name&severity=error&exit_code=117"
|
|
59
|
+
When I send a POST request to "/user/keys" with the following:"type=ssh-rsa&content=XYZ123"
|
|
60
|
+
Then the response should be "422"
|
|
61
|
+
And the error message should have "field=name&severity=error&exit_code=117"
|
|
62
|
+
When I send a POST request to "/user/keys" with the following:"name=cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc&type=ssh-rsa&content=XYZ123"
|
|
63
|
+
Then the response should be "422"
|
|
64
|
+
And the error message should have "field=name&severity=error&exit_code=117"
|
|
65
|
+
|
|
66
|
+
Scenarios:
|
|
67
|
+
| format |
|
|
68
|
+
| JSON |
|
|
69
|
+
| XML |
|
|
70
|
+
|
|
71
|
+
Scenario Outline: Create key with blank, missing and invalid type
|
|
72
|
+
Given a new user
|
|
73
|
+
And I accept "<format>"
|
|
74
|
+
When I send a POST request to "/user/keys" with the following:"name=api&type=ssh-xyz&content=XYZ123567"
|
|
75
|
+
Then the response should be "422"
|
|
76
|
+
And the error message should have "field=type&severity=error&exit_code=116"
|
|
77
|
+
When I send a POST request to "/user/keys" with the following:"name=api&type=&content=XYZ123567"
|
|
78
|
+
Then the response should be "422"
|
|
79
|
+
And the error message should have "field=type&severity=error&exit_code=116"
|
|
80
|
+
When I send a POST request to "/user/keys" with the following:"name=api&content=XYZ123567"
|
|
81
|
+
Then the response should be "422"
|
|
82
|
+
And the error message should have "field=type&severity=error&exit_code=116"
|
|
83
|
+
|
|
84
|
+
Scenarios:
|
|
85
|
+
| format |
|
|
86
|
+
| JSON |
|
|
87
|
+
| XML |
|
|
88
|
+
|
|
89
|
+
Scenario Outline: Retrieve key
|
|
90
|
+
Given a new user
|
|
91
|
+
And I accept "<format>"
|
|
92
|
+
When I send a POST request to "/user/keys" with the following:"name=api&type=ssh-rsa&content=XYZ123"
|
|
93
|
+
Then the response should be "201"
|
|
94
|
+
When I send a GET request to "/user/keys/api"
|
|
95
|
+
Then the response should be "200"
|
|
96
|
+
And the response should be a "key" with attributes "name=api&type=ssh-rsa&content=XYZ123"
|
|
97
|
+
|
|
98
|
+
Scenarios:
|
|
99
|
+
| format |
|
|
100
|
+
| JSON |
|
|
101
|
+
| XML |
|
|
102
|
+
|
|
103
|
+
Scenario Outline: Retrieve non-existent key
|
|
104
|
+
Given a new user
|
|
105
|
+
And I accept "<format>"
|
|
106
|
+
When I send a GET request to "/user/keys/api"
|
|
107
|
+
Then the response should be "404"
|
|
108
|
+
And the error message should have "severity=error&exit_code=118"
|
|
109
|
+
|
|
110
|
+
Scenarios:
|
|
111
|
+
| format |
|
|
112
|
+
| JSON |
|
|
113
|
+
| XML |
|
|
114
|
+
|
|
115
|
+
Scenario Outline: Update key
|
|
116
|
+
Given a new user
|
|
117
|
+
And I accept "<format>"
|
|
118
|
+
When I send a POST request to "/user/keys" with the following:"name=api&type=ssh-rsa&content=XYZ123"
|
|
119
|
+
Then the response should be "201"
|
|
120
|
+
When I send a PUT request to "/user/keys/api" with the following:"type=ssh-rsa&content=ABC890"
|
|
121
|
+
Then the response should be "200"
|
|
122
|
+
And the response should be a "key" with attributes "name=api&type=ssh-rsa&content=ABC890"
|
|
123
|
+
|
|
124
|
+
Scenarios:
|
|
125
|
+
| format |
|
|
126
|
+
| JSON |
|
|
127
|
+
| XML |
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
Scenario Outline: Update key with with blank, missing and invalid content
|
|
131
|
+
Given a new user
|
|
132
|
+
And I accept "<format>"
|
|
133
|
+
When I send a POST request to "/user/keys" with the following:"name=api&type=ssh-rsa&content=XYZ123"
|
|
134
|
+
Then the response should be "201"
|
|
135
|
+
When I send a PUT request to "/user/keys/api" with the following:"type=ssh-rsa&content="
|
|
136
|
+
Then the response should be "422"
|
|
137
|
+
And the error message should have "field=content&severity=error&exit_code=108"
|
|
138
|
+
When I send a PUT request to "/user/keys/api" with the following:"type=ssh-rsa"
|
|
139
|
+
Then the response should be "422"
|
|
140
|
+
And the error message should have "field=content&severity=error&exit_code=108"
|
|
141
|
+
When I send a PUT request to "/user/keys/api" with the following:"type=ssh-rsa&content=ABC8??#@@90"
|
|
142
|
+
Then the response should be "422"
|
|
143
|
+
And the error message should have "field=content&severity=error&exit_code=108"
|
|
144
|
+
When I send a GET request to "/user/keys/api"
|
|
145
|
+
Then the response should be "200"
|
|
146
|
+
And the response should be a "key" with attributes "name=api&type=ssh-rsa&content=XYZ123"
|
|
147
|
+
|
|
148
|
+
Scenarios:
|
|
149
|
+
| format |
|
|
150
|
+
| JSON |
|
|
151
|
+
| XML |
|
|
152
|
+
|
|
153
|
+
Scenario Outline: Update key with blank, missing and invalid type
|
|
154
|
+
Given a new user
|
|
155
|
+
And I accept "<format>"
|
|
156
|
+
When I send a POST request to "/user/keys" with the following:"name=api&type=ssh-rsa&content=XYZ123"
|
|
157
|
+
Then the response should be "201"
|
|
158
|
+
When I send a PUT request to "/user/keys/api" with the following:"type=&content=ABC890"
|
|
159
|
+
Then the response should be "422"
|
|
160
|
+
And the error message should have "field=type&severity=error&exit_code=116"
|
|
161
|
+
When I send a PUT request to "/user/keys/api" with the following:"&content=ABC890"
|
|
162
|
+
Then the response should be "422"
|
|
163
|
+
And the error message should have "field=type&severity=error&exit_code=116"
|
|
164
|
+
When I send a PUT request to "/user/keys/api" with the following:"type=ssh-abc&content=ABC890"
|
|
165
|
+
Then the response should be "422"
|
|
166
|
+
And the error message should have "field=type&severity=error&exit_code=116"
|
|
167
|
+
When I send a GET request to "/user/keys/api"
|
|
168
|
+
Then the response should be "200"
|
|
169
|
+
And the response should be a "key" with attributes "name=api&type=ssh-rsa&content=XYZ123"
|
|
170
|
+
|
|
171
|
+
Scenarios:
|
|
172
|
+
| format |
|
|
173
|
+
| JSON |
|
|
174
|
+
| XML |
|
|
175
|
+
|
|
176
|
+
Scenario Outline: Update non-existent key
|
|
177
|
+
Given a new user
|
|
178
|
+
And I accept "<format>"
|
|
179
|
+
When I send a PUT request to "/user/keys/api1" with the following:"type=ssh-rsa&content=ABC890"
|
|
180
|
+
Then the response should be "404"
|
|
181
|
+
And the error message should have "severity=error&exit_code=118"
|
|
182
|
+
|
|
183
|
+
Scenarios:
|
|
184
|
+
| format |
|
|
185
|
+
| JSON |
|
|
186
|
+
| XML |
|
|
187
|
+
|
|
188
|
+
Scenario Outline: Delete key
|
|
189
|
+
Given a new user
|
|
190
|
+
And I accept "<format>"
|
|
191
|
+
When I send a POST request to "/user/keys" with the following:"name=api&type=ssh-rsa&content=XYZ123"
|
|
192
|
+
Then the response should be "201"
|
|
193
|
+
When I send a POST request to "/user/keys" with the following:"name=api1&type=ssh-rsa&content=XYZ123456"
|
|
194
|
+
Then the response should be "201"
|
|
195
|
+
When I send a DELETE request to "/user/keys/api1"
|
|
196
|
+
Then the response should be "204"
|
|
197
|
+
|
|
198
|
+
Scenarios:
|
|
199
|
+
| format |
|
|
200
|
+
| JSON |
|
|
201
|
+
| XML |
|
|
202
|
+
|
|
203
|
+
Scenario Outline: Delete last key
|
|
204
|
+
Given a new user
|
|
205
|
+
And I accept "<format>"
|
|
206
|
+
When I send a POST request to "/user/keys" with the following:"name=api&type=ssh-rsa&content=XYZ123"
|
|
207
|
+
Then the response should be "201"
|
|
208
|
+
When I send a DELETE request to "/user/keys/api"
|
|
209
|
+
Then the response should be "204"
|
|
210
|
+
|
|
211
|
+
Scenarios:
|
|
212
|
+
| format |
|
|
213
|
+
| JSON |
|
|
214
|
+
| XML |
|
|
215
|
+
|
|
216
|
+
Scenario Outline: Delete non-existent key
|
|
217
|
+
Given a new user
|
|
218
|
+
And I accept "<format>"
|
|
219
|
+
When I send a DELETE request to "/user/keys/api"
|
|
220
|
+
Then the response should be "404"
|
|
221
|
+
And the error message should have "severity=error&exit_code=118"
|
|
222
|
+
|
|
223
|
+
Scenarios:
|
|
224
|
+
| format |
|
|
225
|
+
| JSON |
|
|
226
|
+
| XML |
|
|
227
|
+
|
|
228
|
+
Scenario Outline: Create duplicate key
|
|
229
|
+
Given a new user
|
|
230
|
+
And I accept "<format>"
|
|
231
|
+
When I send a POST request to "/user/keys" with the following:"name=api&type=ssh-rsa&content=XYZ123"
|
|
232
|
+
Then the response should be "201"
|
|
233
|
+
When I send a POST request to "/user/keys" with the following:"name=api&type=ssh-rsa&content=XYZ1234"
|
|
234
|
+
Then the response should be "409"
|
|
235
|
+
When I send a POST request to "/user/keys" with the following:"name=apiX&type=ssh-rsa&content=XYZ123"
|
|
236
|
+
Then the response should be "409"
|
|
237
|
+
|
|
238
|
+
Scenarios:
|
|
239
|
+
| format |
|
|
240
|
+
| JSON |
|
|
241
|
+
| XML |
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|