Permalink
Browse files

Test setting RAILS_ENV and RACK_ENV

Change-Id: I94ec449bf526bbf421df3affac7ee4bbc7e422d8
  • Loading branch information...
1 parent 218a90d commit 5ab0bbb8a1198b9b97ebc8105670a3dc6d34832e Jennifer Hickey committed Jul 3, 2012
Submodule assets deleted from be23b5
View
@@ -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
@@ -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
@@ -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
@@ -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

0 comments on commit 5ab0bbb

Please sign in to comment.