openshift-origin-controller 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of openshift-origin-controller might be problematic. Click here for more details.
- 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,22 @@
|
|
1
|
+
@runtime
|
2
|
+
@not-origin
|
3
|
+
Feature: Cartridge Runtime Extended Checks (Ruby)
|
4
|
+
|
5
|
+
@runtime_extended2
|
6
|
+
Scenario Outline: Hot deployment tests
|
7
|
+
Given a new <type> type application
|
8
|
+
And the application is made publicly accessible
|
9
|
+
And hot deployment <hot_deploy_status> for the application
|
10
|
+
And the application cartridge PIDs are tracked
|
11
|
+
When an update is pushed to the application repo
|
12
|
+
Then a <proc_name> process will be running
|
13
|
+
And the tracked application cartridge PIDs <pid_changed> changed
|
14
|
+
When I destroy the application
|
15
|
+
Then a <proc_name> process will not be running
|
16
|
+
|
17
|
+
Scenarios: Code push scenarios
|
18
|
+
| type | proc_name | hot_deploy_status | pid_changed |
|
19
|
+
| ruby-1.8 | PassengerWatchd | is not enabled | should be |
|
20
|
+
| ruby-1.9 | PassengerWatchd | is not enabled | should be |
|
21
|
+
| ruby-1.8 | PassengerWatchd | is enabled | should not be |
|
22
|
+
| ruby-1.9 | PassengerWatchd | is enabled | should not be |
|
@@ -0,0 +1,19 @@
|
|
1
|
+
@runtime
|
2
|
+
Feature: Cartridge Runtime Standard Checks (Ruby)
|
3
|
+
|
4
|
+
@runtime1
|
5
|
+
Scenario Outline: Ruby cartridge checks on ruby-1.8
|
6
|
+
Given a new <type> application, verify it using httpd
|
7
|
+
|
8
|
+
Scenarios:
|
9
|
+
| type |
|
10
|
+
| ruby-1.8 |
|
11
|
+
|
12
|
+
@runtime1
|
13
|
+
@not-origin
|
14
|
+
Scenario Outline: Ruby cartridge checks on ruby-1.9
|
15
|
+
Given a new <type> application, verify it using httpd
|
16
|
+
|
17
|
+
Scenarios:
|
18
|
+
| type |
|
19
|
+
| ruby-1.9 |
|
@@ -0,0 +1,36 @@
|
|
1
|
+
@runtime
|
2
|
+
@runtime4
|
3
|
+
Feature: SwitchYard Application Sub-Cartridge
|
4
|
+
|
5
|
+
Scenario: Create Delete one EAP application with embedded SwitchYard
|
6
|
+
Given a new jbosseap-6.0 type application
|
7
|
+
|
8
|
+
When I embed a switchyard-0.6 cartridge into the application
|
9
|
+
Then the eap module configuration file will exist
|
10
|
+
|
11
|
+
When I remove the switchyard-0.6 cartridge from the application
|
12
|
+
Then the eap module configuration file will not exist
|
13
|
+
|
14
|
+
When I destroy the application
|
15
|
+
|
16
|
+
Scenario: Create Delete one AS application with embedded SwitchYard
|
17
|
+
Given a new jbossas-7 type application
|
18
|
+
|
19
|
+
When I embed a switchyard-0.6 cartridge into the application
|
20
|
+
Then the as module configuration file will exist
|
21
|
+
|
22
|
+
When I remove the switchyard-0.6 cartridge from the application
|
23
|
+
Then the eap module configuration file will not exist
|
24
|
+
|
25
|
+
When I destroy the application
|
26
|
+
|
27
|
+
Scenario: Create Delete one Non-JBoss application with embedded SwitchYard
|
28
|
+
Given a new php-5.3 type application
|
29
|
+
|
30
|
+
When I fail to embed a switchyard-0.6 cartridge into the application
|
31
|
+
Then the as module configuration file will not exist
|
32
|
+
And the eap module configuration file will not exist
|
33
|
+
|
34
|
+
When I destroy the application
|
35
|
+
|
36
|
+
|
@@ -0,0 +1,40 @@
|
|
1
|
+
@runtime_extended
|
2
|
+
@runtime_extended3
|
3
|
+
Feature: Descriptor parsing and elaboration tests
|
4
|
+
|
5
|
+
Scenario: Descriptor parsing
|
6
|
+
Given an accepted node
|
7
|
+
And a descriptor file is provided
|
8
|
+
When the descriptor file is parsed as a cartridge
|
9
|
+
Then the descriptor profile exists
|
10
|
+
And atleast 1 group exists
|
11
|
+
And atleast 1 component exists
|
12
|
+
|
13
|
+
|
14
|
+
#Scenario: Descriptor elaboration of empty application
|
15
|
+
#Given an accepted node
|
16
|
+
#When a new application object with no framework is created
|
17
|
+
#And the application is elaborated
|
18
|
+
#Then the application contains atleast one group instance
|
19
|
+
#And the application contains atmost one group instance
|
20
|
+
#
|
21
|
+
#Scenario: Descriptor elaboration of application with dependencies
|
22
|
+
#Given an accepted node
|
23
|
+
#When a new application object with php-5.3 framework is created
|
24
|
+
#And the application is elaborated
|
25
|
+
#Then the application contains atleast one group instance
|
26
|
+
#And the application contains atmost one group instance
|
27
|
+
#And the application does contain php-5.3 components
|
28
|
+
#
|
29
|
+
#Scenario: Descriptor elaboration after dynamically adding and removing dependencies
|
30
|
+
#Given an accepted node
|
31
|
+
#When a new application object with php-5.3 framework is created
|
32
|
+
#And the application is elaborated
|
33
|
+
#Then the application does contain php-5.3 components
|
34
|
+
#When the cartridge mongodb-2.2 is added
|
35
|
+
#And the application is elaborated
|
36
|
+
#Then the application does contain mongodb-2.2 components
|
37
|
+
#When the cartridge mongodb-2.2 is removed
|
38
|
+
#And the application is elaborated
|
39
|
+
#Then the application does not contain mongodb-2.2 components
|
40
|
+
#
|
@@ -0,0 +1,44 @@
|
|
1
|
+
@runtime_extended
|
2
|
+
@runtime_extended3
|
3
|
+
Feature: Embedded Cartridge Verification Tests
|
4
|
+
|
5
|
+
Scenario: Embedded Usage
|
6
|
+
Given the libra client tools
|
7
|
+
And an accepted node
|
8
|
+
When 1 php-5.3 applications are created
|
9
|
+
Then the applications should be accessible
|
10
|
+
|
11
|
+
Given an existing php-5.3 application without an embedded cartridge
|
12
|
+
When the embedded mysql-5.1 cartridge is added
|
13
|
+
And the embedded phpmyadmin-3.4 cartridge is added
|
14
|
+
Then the application should be accessible
|
15
|
+
When the application uses mysql
|
16
|
+
Then the application should be accessible
|
17
|
+
And the mysql response is successful
|
18
|
+
When the embedded phpmyadmin-3.4 cartridge is removed
|
19
|
+
And the embedded mysql-5.1 cartridge is removed
|
20
|
+
Then the application should be accessible
|
21
|
+
|
22
|
+
When the embedded mongodb-2.2 cartridge is added
|
23
|
+
And the embedded cron-1.4 cartridge is added
|
24
|
+
Then the application should be accessible
|
25
|
+
And the embedded mongodb-2.2 cartridge is removed
|
26
|
+
And the embedded cron-1.4 cartridge is removed
|
27
|
+
Then the application should be accessible
|
28
|
+
|
29
|
+
When the application is destroyed
|
30
|
+
Then the application should not be accessible
|
31
|
+
|
32
|
+
#Scenario: Jenkins Client Usage
|
33
|
+
# Given the libra client tools
|
34
|
+
# And an accepted node
|
35
|
+
# When 1 jenkins-1.4 applications are created
|
36
|
+
# Then the applications should be accessible
|
37
|
+
# Given an existing jenkins-1.4 application without an embedded cartridge
|
38
|
+
# When the embedded jenkins-client-1.4 cartridge is added
|
39
|
+
# Then the application should be accessible
|
40
|
+
# When the embedded jenkins-client-1.4 cartridge is removed
|
41
|
+
# Then the application should be accessible
|
42
|
+
# When the application is destroyed
|
43
|
+
# Then the application should not be accessible
|
44
|
+
|
@@ -0,0 +1,75 @@
|
|
1
|
+
@singleton
|
2
|
+
Feature: Explicit idle/restore checks
|
3
|
+
|
4
|
+
Scenario Outline: Idle one application
|
5
|
+
Given a new <type> type application
|
6
|
+
Then a <proc_name> process will be running
|
7
|
+
And I record the active capacity
|
8
|
+
|
9
|
+
When I oo-idle the application
|
10
|
+
Then a <proc_name> process will not be running
|
11
|
+
And the active capacity has been reduced
|
12
|
+
|
13
|
+
Scenarios:
|
14
|
+
| type | proc_name |
|
15
|
+
| jbossas-7 | java |
|
16
|
+
| jbosseap-6.0 | java |
|
17
|
+
| jbossews-1.0 | java |
|
18
|
+
| nodejs-0.6 | node |
|
19
|
+
| perl-5.10 | httpd |
|
20
|
+
| php-5.3 | httpd |
|
21
|
+
| python-2.6 | httpd |
|
22
|
+
| ruby-1.8 | httpd |
|
23
|
+
| ruby-1.9 | httpd |
|
24
|
+
|
25
|
+
Scenario Outline: Restore one application
|
26
|
+
Given a new <type> type application
|
27
|
+
Then a <proc_name> process will be running
|
28
|
+
And I record the active capacity
|
29
|
+
|
30
|
+
When I oo-idle the application
|
31
|
+
Then a <proc_name> process will not be running
|
32
|
+
And the active capacity has been reduced
|
33
|
+
And I record the active capacity after idling
|
34
|
+
|
35
|
+
When I oo-restore the application
|
36
|
+
Then a <proc_name> process will be running
|
37
|
+
And the active capacity has been increased
|
38
|
+
|
39
|
+
Scenarios:
|
40
|
+
| type | proc_name |
|
41
|
+
| jbossas-7 | java |
|
42
|
+
| jbosseap-6.0 | java |
|
43
|
+
| jbossews-1.0 | java |
|
44
|
+
| nodejs-0.6 | node |
|
45
|
+
| perl-5.10 | httpd |
|
46
|
+
| php-5.3 | httpd |
|
47
|
+
| python-2.6 | httpd |
|
48
|
+
| ruby-1.8 | httpd |
|
49
|
+
| ruby-1.9 | httpd |
|
50
|
+
|
51
|
+
Scenario Outline: Auto-restore one application
|
52
|
+
Given a new <type> type application
|
53
|
+
Then a <proc_name> process will be running
|
54
|
+
And I record the active capacity
|
55
|
+
|
56
|
+
When I oo-idle the application
|
57
|
+
Then a <proc_name> process will not be running
|
58
|
+
And the active capacity has been reduced
|
59
|
+
And I record the active capacity after idling
|
60
|
+
|
61
|
+
When I run the health-check for the <type> cartridge
|
62
|
+
Then a <proc_name> process will be running
|
63
|
+
And the active capacity has been increased
|
64
|
+
|
65
|
+
Scenarios:
|
66
|
+
| type | proc_name |
|
67
|
+
| jbossas-7 | java |
|
68
|
+
| jbosseap-6.0 | java |
|
69
|
+
| jbossews-1.0 | java |
|
70
|
+
| nodejs-0.6 | node |
|
71
|
+
| perl-5.10 | httpd |
|
72
|
+
| php-5.3 | httpd |
|
73
|
+
| python-2.6 | httpd |
|
74
|
+
| ruby-1.8 | httpd |
|
75
|
+
| ruby-1.9 | httpd |
|
@@ -0,0 +1,22 @@
|
|
1
|
+
Name: www-dynamic
|
2
|
+
Display-Name: www-dynamic v2.2 (noarch)
|
3
|
+
Description: Web server
|
4
|
+
Version: 1.0.0
|
5
|
+
License: ASL 2.0
|
6
|
+
Vendor: Apache
|
7
|
+
Provides:
|
8
|
+
- "www-dynamic"
|
9
|
+
Conflicts:
|
10
|
+
Native-Requires: mod_bw
|
11
|
+
Architecture: noarch
|
12
|
+
Publishes:
|
13
|
+
get-internal-uri:
|
14
|
+
Type: "NET_TCP:HTTP"
|
15
|
+
Subscribes:
|
16
|
+
set-doc-root:
|
17
|
+
Type: "FILESYSTEM:doc-root"
|
18
|
+
Required: false
|
19
|
+
set-proxy-url:
|
20
|
+
Type: "STRING:proxy-path"
|
21
|
+
Required: false
|
22
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?php
|
2
|
+
# Connection Info
|
3
|
+
$hostname="HOSTNAME";
|
4
|
+
$user="USER";
|
5
|
+
$password="PASSWORD";
|
6
|
+
$database="mysql";
|
7
|
+
|
8
|
+
# Queries
|
9
|
+
$table_sql="CREATE TABLE test2(id int(6) NOT NULL auto_increment, name varchar(15) NOT NULL, PRIMARY KEY(id))";
|
10
|
+
$insert_sql="INSERT INTO test2 VALUES ('', 'Success')";
|
11
|
+
$select_sql="SELECT * from test2";
|
12
|
+
|
13
|
+
# MySQL verification
|
14
|
+
mysql_connect($hostname, $user, $password) or die(mysql_error());
|
15
|
+
mysql_select_db($database) or die(mysql_error());
|
16
|
+
mysql_query($table_sql);
|
17
|
+
mysql_query($insert_sql);
|
18
|
+
$result=mysql_query($select_sql) or die(mysql_error());
|
19
|
+
mysql_close();
|
20
|
+
echo mysql_result($result,0,"name")
|
21
|
+
?>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
@runtime
|
2
|
+
@runtime4
|
3
|
+
Feature: Account Management
|
4
|
+
Scenario: Create One Account
|
5
|
+
Given an accepted node
|
6
|
+
When I create a guest account
|
7
|
+
Then an account password entry should exist
|
8
|
+
And an account home directory should exist
|
9
|
+
|
10
|
+
Scenario: Delete One Account
|
11
|
+
Given an accepted node
|
12
|
+
And a new guest account
|
13
|
+
When I delete the guest account
|
14
|
+
Then an account password entry should not exist
|
15
|
+
And an account home directory should not exist
|
16
|
+
|
17
|
+
Scenario: Delete One Namespace
|
18
|
+
Given an accepted node
|
19
|
+
When I create a new namespace
|
20
|
+
And I delete the namespace
|
21
|
+
Then a namespace should get deleted
|
@@ -0,0 +1,31 @@
|
|
1
|
+
@broker_api
|
2
|
+
@broker_api1
|
3
|
+
@not-origin
|
4
|
+
Feature: application templates
|
5
|
+
As an API client
|
6
|
+
In order to do things with application templates
|
7
|
+
I want to List and Show application templates without authenticating
|
8
|
+
|
9
|
+
Scenario Outline: List application templates
|
10
|
+
Given I accept "<format>"
|
11
|
+
When I send an unauthenticated GET request to "/application_templates"
|
12
|
+
Then the response should be "200"
|
13
|
+
#And the response should be a list of "application templates"
|
14
|
+
|
15
|
+
Scenarios:
|
16
|
+
|format|
|
17
|
+
|JSON|
|
18
|
+
|XML|
|
19
|
+
|
20
|
+
#Scenario Outline: Get a specific application template
|
21
|
+
# Given I accept "<format>"
|
22
|
+
# And an application template UUID
|
23
|
+
# When I send an unauthenticated GET request to "/application_templates/<uuid>"
|
24
|
+
# Then the response should be "200"
|
25
|
+
# And the response should be a "application template"
|
26
|
+
|
27
|
+
# Scenarios:
|
28
|
+
# |format|
|
29
|
+
# |JSON|
|
30
|
+
# |XML|
|
31
|
+
|
@@ -0,0 +1,431 @@
|
|
1
|
+
@broker_api
|
2
|
+
@broker_api2
|
3
|
+
Feature: applications
|
4
|
+
As an API client
|
5
|
+
In order to do things with domains
|
6
|
+
I want to List, Create, Retrieve, Start, Stop, Restart, Force-stop and Delete applications
|
7
|
+
|
8
|
+
Scenario Outline: List applications
|
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 POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=php-5.3"
|
14
|
+
Then the response should be "201"
|
15
|
+
When I send a GET request to "/domains/api<random>/applications"
|
16
|
+
Then the response should be "200"
|
17
|
+
When I send a DELETE request to "/domains/api<random>/applications/app"
|
18
|
+
Then the response should be "204"
|
19
|
+
|
20
|
+
Scenarios:
|
21
|
+
| format |
|
22
|
+
| JSON |
|
23
|
+
| XML |
|
24
|
+
|
25
|
+
|
26
|
+
Scenario Outline: Create application
|
27
|
+
Given a new user
|
28
|
+
And I accept "<format>"
|
29
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
30
|
+
Then the response should be "201"
|
31
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=php-5.3"
|
32
|
+
Then the response should be "201"
|
33
|
+
And the response should be a "application" with attributes "name=app&framework=php-5.3"
|
34
|
+
When I send a DELETE request to "/domains/api<random>/applications/app"
|
35
|
+
Then the response should be "204"
|
36
|
+
|
37
|
+
Scenarios:
|
38
|
+
| format |
|
39
|
+
| JSON |
|
40
|
+
| XML |
|
41
|
+
|
42
|
+
Scenario Outline: Create application with multiple cartridges
|
43
|
+
Given a new user
|
44
|
+
And I accept "<format>"
|
45
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
46
|
+
Then the response should be "201"
|
47
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridges=php-5.3&cartridges=mysql-5.1&cartridges=phpmyadmin-3.4&initial_git_url=https://github.com/openshift/wordpress-example"
|
48
|
+
Then the response should be "201"
|
49
|
+
And the response should be a "application" with attributes "name=app&framework=php-5.3"
|
50
|
+
When I send a DELETE request to "/domains/api<random>/applications/app"
|
51
|
+
Then the response should be "204"
|
52
|
+
|
53
|
+
Scenarios:
|
54
|
+
| format |
|
55
|
+
| JSON |
|
56
|
+
| XML |
|
57
|
+
|
58
|
+
Scenario Outline: Create application with invalid cartridge combinations
|
59
|
+
Given a new user
|
60
|
+
And I accept "<format>"
|
61
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
62
|
+
Then the response should be "201"
|
63
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridges=mysql-5.1&cartridges=phpmyadmin-3.4"
|
64
|
+
Then the response should be "422"
|
65
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridges=php-5.3&cartridges=ruby-1.9"
|
66
|
+
Then the response should be "422"
|
67
|
+
|
68
|
+
Scenarios:
|
69
|
+
| format |
|
70
|
+
| JSON |
|
71
|
+
| XML |
|
72
|
+
|
73
|
+
Scenario Outline: Create application with blank, missing, too long and invalid name
|
74
|
+
Given a new user
|
75
|
+
And I accept "<format>"
|
76
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
77
|
+
Then the response should be "201"
|
78
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=&cartridge=php-5.3"
|
79
|
+
Then the response should be "422"
|
80
|
+
And the error message should have "field=name&severity=error&exit_code=105"
|
81
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"cartridge=php-5.3"
|
82
|
+
Then the response should be "422"
|
83
|
+
And the error message should have "field=name&severity=error&exit_code=105"
|
84
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app?one&cartridge=php-5.3"
|
85
|
+
Then the response should be "422"
|
86
|
+
And the error message should have "field=name&severity=error&exit_code=105"
|
87
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=appone1234567890123456789012345678901234567890&cartridge=php-5.3"
|
88
|
+
Then the response should be "422"
|
89
|
+
And the error message should have "field=name&severity=error&exit_code=105"
|
90
|
+
|
91
|
+
Scenarios:
|
92
|
+
| format |
|
93
|
+
| JSON |
|
94
|
+
| XML |
|
95
|
+
|
96
|
+
Scenario Outline: Retrieve application
|
97
|
+
Given a new user
|
98
|
+
And I accept "<format>"
|
99
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
100
|
+
Then the response should be "201"
|
101
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=php-5.3"
|
102
|
+
Then the response should be "201"
|
103
|
+
When I send a GET request to "/domains/api<random>/applications/app"
|
104
|
+
Then the response should be "200"
|
105
|
+
And the response should be a "application" with attributes "name=app&framework=php-5.3"
|
106
|
+
When I send a DELETE request to "/domains/api<random>/applications/app"
|
107
|
+
Then the response should be "204"
|
108
|
+
|
109
|
+
Scenarios:
|
110
|
+
| format |
|
111
|
+
| JSON |
|
112
|
+
| XML |
|
113
|
+
|
114
|
+
Scenario Outline: Start application
|
115
|
+
Given a new user
|
116
|
+
And I accept "<format>"
|
117
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
118
|
+
Then the response should be "201"
|
119
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=php-5.3"
|
120
|
+
Then the response should be "201"
|
121
|
+
When I send a POST request to "/domains/api<random>/applications/app/events" with the following:"event=start"
|
122
|
+
Then the response should be "200"
|
123
|
+
When I send a DELETE request to "/domains/api<random>/applications/app"
|
124
|
+
Then the response should be "204"
|
125
|
+
|
126
|
+
Scenarios:
|
127
|
+
| format |
|
128
|
+
| JSON |
|
129
|
+
| XML |
|
130
|
+
|
131
|
+
Scenario Outline: Stop application
|
132
|
+
Given a new user
|
133
|
+
And I accept "<format>"
|
134
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
135
|
+
Then the response should be "201"
|
136
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=php-5.3"
|
137
|
+
Then the response should be "201"
|
138
|
+
When I send a POST request to "/domains/api<random>/applications/app/events" with the following:"event=stop"
|
139
|
+
Then the response should be "200"
|
140
|
+
When I send a DELETE request to "/domains/api<random>/applications/app"
|
141
|
+
Then the response should be "204"
|
142
|
+
|
143
|
+
Scenarios:
|
144
|
+
| format |
|
145
|
+
| JSON |
|
146
|
+
| XML |
|
147
|
+
|
148
|
+
Scenario Outline: Restart application
|
149
|
+
Given a new user
|
150
|
+
And I accept "<format>"
|
151
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
152
|
+
Then the response should be "201"
|
153
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=php-5.3"
|
154
|
+
Then the response should be "201"
|
155
|
+
When I send a POST request to "/domains/api<random>/applications/app/events" with the following:"event=restart"
|
156
|
+
Then the response should be "200"
|
157
|
+
When I send a DELETE request to "/domains/api<random>/applications/app"
|
158
|
+
Then the response should be "204"
|
159
|
+
|
160
|
+
Scenarios:
|
161
|
+
| format |
|
162
|
+
| JSON |
|
163
|
+
| XML |
|
164
|
+
|
165
|
+
Scenario Outline: Force-stop application
|
166
|
+
Given a new user
|
167
|
+
And I accept "<format>"
|
168
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
169
|
+
Then the response should be "201"
|
170
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=php-5.3"
|
171
|
+
Then the response should be "201"
|
172
|
+
When I send a POST request to "/domains/api<random>/applications/app/events" with the following:"event=force-stop"
|
173
|
+
Then the response should be "200"
|
174
|
+
When I send a DELETE request to "/domains/api<random>/applications/app"
|
175
|
+
Then the response should be "204"
|
176
|
+
|
177
|
+
Scenarios:
|
178
|
+
| format |
|
179
|
+
| JSON |
|
180
|
+
| XML |
|
181
|
+
|
182
|
+
Scenario Outline: Threaddump application
|
183
|
+
Given a new user
|
184
|
+
And I accept "<format>"
|
185
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
186
|
+
Then the response should be "201"
|
187
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=ruby-1.8"
|
188
|
+
Then the response should be "201"
|
189
|
+
When I send a POST request to "/domains/api<random>/applications/app/events" with the following:"event=thread-dump"
|
190
|
+
Then the response should be "200"
|
191
|
+
When I send a DELETE request to "/domains/api<random>/applications/app"
|
192
|
+
Then the response should be "204"
|
193
|
+
|
194
|
+
Scenarios:
|
195
|
+
| format |
|
196
|
+
| JSON |
|
197
|
+
| XML |
|
198
|
+
Scenario Outline: Add and remove application alias
|
199
|
+
Given a new user
|
200
|
+
And I accept "<format>"
|
201
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
202
|
+
Then the response should be "201"
|
203
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=php-5.3"
|
204
|
+
Then the response should be "201"
|
205
|
+
When I send a POST request to "/domains/api<random>/applications/app/events" with the following:"event=add-alias"
|
206
|
+
Then the response should be "422"
|
207
|
+
When I send a POST request to "/domains/api<random>/applications/app/events" with the following:"event=add-alias&alias=app-api.foobar.com"
|
208
|
+
Then the response should be "200"
|
209
|
+
When I send a POST request to "/domains/api<random>/applications/app/events" with the following:"event=remove-alias&alias=app-api.foobar.com"
|
210
|
+
Then the response should be "200"
|
211
|
+
When I send a POST request to "/domains/api<random>/applications/app/events" with the following:"event=add-alias&alias=app-@#$api.foobar.com"
|
212
|
+
Then the response should be "422"
|
213
|
+
When I send a DELETE request to "/domains/api<random>/applications/app"
|
214
|
+
Then the response should be "204"
|
215
|
+
|
216
|
+
Scenarios:
|
217
|
+
| format |
|
218
|
+
| JSON |
|
219
|
+
| XML |
|
220
|
+
|
221
|
+
Scenario Outline: Delete application
|
222
|
+
Given a new user
|
223
|
+
And I accept "<format>"
|
224
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
225
|
+
Then the response should be "201"
|
226
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=php-5.3"
|
227
|
+
Then the response should be "201"
|
228
|
+
When I send a DELETE request to "/domains/api<random>/applications/app"
|
229
|
+
Then the response should be "204"
|
230
|
+
When I send a GET request to "/domains/api<random>/applications/app"
|
231
|
+
Then the response should be "404"
|
232
|
+
|
233
|
+
Scenarios:
|
234
|
+
| format |
|
235
|
+
| JSON |
|
236
|
+
| XML |
|
237
|
+
|
238
|
+
Scenario Outline: Create duplicate application
|
239
|
+
Given a new user
|
240
|
+
And I accept "<format>"
|
241
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
242
|
+
Then the response should be "201"
|
243
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=php-5.3"
|
244
|
+
Then the response should be "201"
|
245
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=php-5.3"
|
246
|
+
Then the response should be "422"
|
247
|
+
And the error message should have "field=name&severity=error&exit_code=100"
|
248
|
+
When I send a DELETE request to "/domains/api<random>/applications/app"
|
249
|
+
Then the response should be "204"
|
250
|
+
|
251
|
+
Scenarios:
|
252
|
+
| format |
|
253
|
+
| JSON |
|
254
|
+
| XML |
|
255
|
+
|
256
|
+
Scenario Outline: Create application with invalid, blank or missing cartridge
|
257
|
+
Given a new user
|
258
|
+
And I accept "<format>"
|
259
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
260
|
+
Then the response should be "201"
|
261
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=bogus"
|
262
|
+
Then the response should be "422"
|
263
|
+
And the error message should have "field=cartridge&severity=error&exit_code=109"
|
264
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge="
|
265
|
+
Then the response should be "422"
|
266
|
+
And the error message should have "field=cartridge&severity=error&exit_code=109"
|
267
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app"
|
268
|
+
Then the response should be "422"
|
269
|
+
And the error message should have "field=cartridge&severity=error&exit_code=109"
|
270
|
+
When I send a DELETE request to "/domains/api<random>/applications/app"
|
271
|
+
Then the response should be "404"
|
272
|
+
|
273
|
+
Scenarios:
|
274
|
+
| format |
|
275
|
+
| JSON |
|
276
|
+
| XML |
|
277
|
+
|
278
|
+
Scenario Outline: Retrieve or delete a non-existent application
|
279
|
+
Given a new user
|
280
|
+
And I accept "<format>"
|
281
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
282
|
+
Then the response should be "201"
|
283
|
+
When I send a GET request to "/domains/api<random>/applications/app"
|
284
|
+
Then the response should be "404"
|
285
|
+
And the error message should have "severity=error&exit_code=101"
|
286
|
+
When I send a DELETE request to "/domains/api<random>/applications/app"
|
287
|
+
Then the response should be "404"
|
288
|
+
And the error message should have "severity=error&exit_code=101"
|
289
|
+
Scenarios:
|
290
|
+
| format |
|
291
|
+
| JSON |
|
292
|
+
| XML |
|
293
|
+
|
294
|
+
Scenario Outline: Retrieve application descriptor
|
295
|
+
Given a new user
|
296
|
+
And I accept "<format>"
|
297
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
298
|
+
Then the response should be "201"
|
299
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=php-5.3"
|
300
|
+
Then the response should be "201"
|
301
|
+
When I send a POST request to "/domains/api<random>/applications/app/cartridges" with the following:"cartridge=mysql-5.1"
|
302
|
+
Then the response should be "201"
|
303
|
+
When I send a GET request to "/domains/api<random>/applications/app/descriptor"
|
304
|
+
Then the response descriptor should have "php-5.3,mysql-5.1" as dependencies
|
305
|
+
When I send a DELETE request to "/domains/api<random>/applications/app"
|
306
|
+
Then the response should be "204"
|
307
|
+
|
308
|
+
Scenarios:
|
309
|
+
| format |
|
310
|
+
| JSON |
|
311
|
+
| XML |
|
312
|
+
|
313
|
+
Scenario Outline: Stop and Start embedded cartridge
|
314
|
+
Given a new user
|
315
|
+
And I accept "<format>"
|
316
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
317
|
+
Then the response should be "201"
|
318
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=php-5.3"
|
319
|
+
Then the response should be "201"
|
320
|
+
When I send a POST request to "/domains/api<random>/applications/app/cartridges" with the following:"cartridge=mysql-5.1"
|
321
|
+
Then the response should be "201"
|
322
|
+
When I send a GET request to "/domains/api<random>/applications/app/descriptor"
|
323
|
+
Then the response descriptor should have "php-5.3,mysql-5.1" as dependencies
|
324
|
+
When I send a POST request to "/domains/api<random>/applications/app/cartridges/mysql-5.1/events" with the following:"event=stop"
|
325
|
+
Then the response should be "200"
|
326
|
+
When I send a POST request to "/domains/api<random>/applications/app/cartridges/mysql-5.1/events" with the following:"event=start"
|
327
|
+
Then the response should be "200"
|
328
|
+
When I send a DELETE request to "/domains/api<random>/applications/app"
|
329
|
+
Then the response should be "204"
|
330
|
+
|
331
|
+
Scenarios:
|
332
|
+
| format |
|
333
|
+
| JSON |
|
334
|
+
| XML |
|
335
|
+
|
336
|
+
Scenario Outline: Restart embedded cartridge
|
337
|
+
Given a new user
|
338
|
+
And I accept "<format>"
|
339
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
340
|
+
Then the response should be "201"
|
341
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=php-5.3"
|
342
|
+
Then the response should be "201"
|
343
|
+
When I send a POST request to "/domains/api<random>/applications/app/cartridges" with the following:"cartridge=mysql-5.1"
|
344
|
+
Then the response should be "201"
|
345
|
+
When I send a GET request to "/domains/api<random>/applications/app/cartridges/mysql-5.1"
|
346
|
+
Then the response should be "200"
|
347
|
+
When I send a GET request to "/domains/api<random>/applications/app/descriptor"
|
348
|
+
Then the response descriptor should have "php-5.3,mysql-5.1" as dependencies
|
349
|
+
When I send a POST request to "/domains/api<random>/applications/app/cartridges/mysql-5.1/events" with the following:"event=restart"
|
350
|
+
Then the response should be "200"
|
351
|
+
When I send a DELETE request to "/domains/api<random>/applications/app"
|
352
|
+
Then the response should be "204"
|
353
|
+
|
354
|
+
Scenarios:
|
355
|
+
| format |
|
356
|
+
| JSON |
|
357
|
+
| XML |
|
358
|
+
|
359
|
+
Scenario Outline: Remove embedded cartridge
|
360
|
+
Given a new user
|
361
|
+
And I accept "<format>"
|
362
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
363
|
+
Then the response should be "201"
|
364
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=php-5.3"
|
365
|
+
Then the response should be "201"
|
366
|
+
When I send a POST request to "/domains/api<random>/applications/app/cartridges" with the following:"cartridge=mysql-5.1"
|
367
|
+
Then the response should be "201"
|
368
|
+
When I send a GET request to "/domains/api<random>/applications/app/descriptor"
|
369
|
+
Then the response descriptor should have "php-5.3,mysql-5.1" as dependencies
|
370
|
+
When I send a DELETE request to "/domains/api<random>/applications/app/cartridges/mysql-5.1"
|
371
|
+
Then the response should be "200"
|
372
|
+
When I send a GET request to "/domains/api<random>/applications/app/descriptor"
|
373
|
+
Then the response descriptor should have "php-5.3" as dependencies
|
374
|
+
When I send a DELETE request to "/domains/api<random>/applications/app"
|
375
|
+
Then the response should be "204"
|
376
|
+
|
377
|
+
Scenarios:
|
378
|
+
| format |
|
379
|
+
| JSON |
|
380
|
+
| XML |
|
381
|
+
|
382
|
+
|
383
|
+
Scenario Outline: Scale-up and scale-down as application that is not scalable
|
384
|
+
Given a new user
|
385
|
+
And I accept "<format>"
|
386
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
387
|
+
Then the response should be "201"
|
388
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=diy-0.1"
|
389
|
+
Then the response should be "201"
|
390
|
+
When I send a POST request to "/domains/api<random>/applications/app/events" with the following:"event=scale-up"
|
391
|
+
Then the response should be "422"
|
392
|
+
When I send a POST request to "/domains/api<random>/applications/app/events" with the following:"event=scale-down"
|
393
|
+
Then the response should be "422"
|
394
|
+
When I send a DELETE request to "/domains/api<random>/applications/app"
|
395
|
+
Then the response should be "204"
|
396
|
+
|
397
|
+
Scenarios:
|
398
|
+
| format |
|
399
|
+
| JSON |
|
400
|
+
| XML |
|
401
|
+
|
402
|
+
Scenario Outline: add application or application event to a non-existent domain
|
403
|
+
Given a new user
|
404
|
+
And I accept "<format>"
|
405
|
+
When I send a POST request to "/domains/bogus/applications" with the following:"name=app&cartridge=jbossas-7"
|
406
|
+
Then the response should be "404"
|
407
|
+
And the error message should have "severity=error&exit_code=127"
|
408
|
+
When I send a POST request to "/domains/bogus/applications/app/events" with the following:"event=scale-up"
|
409
|
+
Then the response should be "404"
|
410
|
+
And the error message should have "severity=error&exit_code=127"
|
411
|
+
|
412
|
+
Scenarios:
|
413
|
+
| format |
|
414
|
+
| JSON |
|
415
|
+
| XML |
|
416
|
+
|
417
|
+
Scenario Outline: Resolve application dns
|
418
|
+
Given a new user
|
419
|
+
And I accept "<format>"
|
420
|
+
When I send a POST request to "/domains" with the following:"id=api<random>"
|
421
|
+
Then the response should be "201"
|
422
|
+
When I send a POST request to "/domains/api<random>/applications" with the following:"name=app&cartridge=php-5.3"
|
423
|
+
Then the response should be "201"
|
424
|
+
When I send a GET request to "/domains/api<random>/applications/app/dns_resolvable"
|
425
|
+
Then the response should be one of "200,404"
|
426
|
+
|
427
|
+
Scenarios:
|
428
|
+
| format |
|
429
|
+
| JSON |
|
430
|
+
| XML |
|
431
|
+
|