Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge "Test setting RAILS_ENV and RACK_ENV"

  • Loading branch information...
commit ac45614c81e83aa5711c0bf4642e446dc333e93b 2 parents b15c349 + 5ab0bbb
Jennifer Hickey authored Gerrit Code Review committed
1  assets
@@ -1 +0,0 @@
-Subproject commit be23b5ddb76cd1b63e5075ae2d84f5110a711b11
View
1  assets
View
10 features/canonical_apps_rack.feature
@@ -23,11 +23,21 @@ Feature: Deploy the rack canonical app and check its services
Scenario: rack test deploy app
When I query status of my application
Then I should get the state of my application
+ Then I should be able to access my application URL rack/env and see production
Then I should be able to access my application root and see hello from sinatra
Then I should be able to access crash and it should crash
When I delete my application
Then it should not be on Cloud Foundry
+ Scenario: rack test setting RACK_ENV
+ Given I have my running application named app_rack_service
+ Then I set app_rack_service environment variable RACK_ENV to development
+ Then I stop my application
+ Then I start my application named app_rack_service
+ Then I should be able to access my application URL rack/env and see development
+ When I delete my application
+ Then it should not be on Cloud Foundry
+
@mysql
Scenario: rack test mysql service
Given I have my running application named app_rack_service
View
11 features/canonical_apps_rails.feature
@@ -24,10 +24,21 @@ Feature: Deploy the rails canonical app and check its services
When I query status of my application
Then I should get the state of my application
Then I should be able to access my application root and see hello from rails
+ Then I should be able to access my application file logs/stdout.log and get text including starting in production
Then I should be able to access crash and it should crash
When I delete my application
Then it should not be on AppCloud
+ Scenario: rails test setting RAILS_ENV
+ Given I have my running application named app_rails_service
+ Then I stop my application
+ Then I set app_rails_service environment variable RAILS_ENV to development
+ Then I start my application named app_rails_service
+ Then I should be able to access my application root and see hello from rails
+ Then I should be able to access my application file logs/stdout.log and get text including starting in development
+ When I delete my application
+ Then it should not be on AppCloud
+
@mysql
Scenario: rails test mysql service
Given I have my running application named app_rails_service
View
12 features/canonical_apps_sinatra.feature
@@ -24,10 +24,22 @@ Feature: Deploy the sinatra canonical app and check its services
When I query status of my application
Then I should get the state of my application
Then I should be able to access my application root and see hello from sinatra
+ Then I should be able to access my application URL rack/env and see production
+ Then I should be able to access my application file logs/stdout.log and get text including for production with backup
Then I should be able to access crash and it should crash
When I delete my application
Then it should not be on AppCloud
+ Scenario: sinatra test setting RACK_ENV
+ Given I have my running application named app_sinatra_service
+ Then I set app_sinatra_service environment variable RACK_ENV to development
+ Then I stop my application
+ Then I start my application named app_sinatra_service
+ Then I should be able to access my application URL rack/env and see development
+ Then I should be able to access my application file logs/stdout.log and get text including for development with backup
+ When I delete my application
+ Then it should not be on Cloud Foundry
+
@mysql
Scenario: sinatra test mysql service
Given I have my running application named app_sinatra_service
View
13 features/step_definitions/appcloud_steps.rb
@@ -969,3 +969,16 @@
contents.body_str.should include "JVM version: #{value}"
contents.close
end
+
+Then /^I should be able to access my application URL (\S+) and see (\S+)$/ do |path, expected_value|
+ path = nil if path == "root"
+ contents = get_app_contents @app, path
+ contents.should_not == nil
+ contents.body_str.should == expected_value
+ contents.response_code.should == 200
+ contents.close
+end
+
+Then /^I set (\w+) environment variable (\w+) to (\w+)$/ do |app, env_name, env_value|
+ environment_add app, env_name, env_value
+end
Please sign in to comment.
Something went wrong with that request. Please try again.