Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

...
  • 13 commits
  • 15 files changed
  • 0 commit comments
  • 7 contributors
Commits on Mar 16, 2012
Ramnivas Laddad ramnivas Update to Tomcat7
Change-Id: I07b1814bc130d2fc8edbcfe9bcf9d97cd7988a1b
a098422
Jennifer Hickey Add test for Rails console stdout redirection
Change-Id: I7e0dffe39b1e5a898d7887fb609b78e44649f8d9
846410c
Commits on Mar 23, 2012
Jennifer Hickey Merge "Add test for Rails console stdout redirection" 811f4d1
Commits on Mar 24, 2012
Leo Li leoli Prompt meaningful message for BVT if no maven
1. Previously, it says "Command failed with status (127): [mvn clean -q...]". It confuses the user.
2. This commit will detect if maven is installed. If not, it prompts to install maven and jdk.

Change-Id: I26b09c111a0dd3db88ebe78ae80e506ae512085a
Signed-off-by: Leo Li <lileo@rbcon.com>
05fb1ff
Commits on Mar 28, 2012
Dale Olds daleolds add change password to basic user account tests
Change-Id: I141fca9fa2dc28d3e8fa3c1e2cb66d5a4025accc
20921d8
Leo Li leoli Merge "Prompt meaningful message for BVT if no maven" 6eac85d
Jennifer Hickey Add tests for standalone app support
Change-Id: I265a4cbe1e669625506cbf64daefd00957bb327a
f9de2a8
Commits on Mar 29, 2012
Jennifer Hickey Remove pending from Standalone Framework tests
Change-Id: Ieb6453bb313c4e974f8f250da98c90b08b02c104
055539b
Commits on Mar 30, 2012
Patrick Bozeman Revert "Update to Tomcat7"
This reverts commit a098422.

Change-Id: I03863416c9e12921a56327ee6a9fbacc11019804
f4660f8
Patrick Bozeman go back to vmc beta5
Change-Id: I7f961e45739f99fe1592b18676fb52bec79ed367
a12c6dd
Commits on Mar 31, 2012
Frank Lu mflu Enable service lifecycle bvt test for postgresql service
Change-Id: I64cd93d5837962f086b31c8203b958d78b1deba0
e2f752a
Commits on Apr 05, 2012
figo add service limit test - postgresql db size
Change-Id: I0a79965a37cceb9359962f7b72f8406221b5471d
8eb8fd9
Commits on Apr 06, 2012
Patrick Bozeman Merge remote-tracking branch 'cf/master' b166f34
2  Gemfile
View
@@ -13,7 +13,7 @@ gem "rest-client"
gem "rubyzip", "~> 0.9.4"
gem "terminal-table"
gem "highline"
-gem "vmc", ">= 0.3.16.beta3"
+gem "vmc", ">= 0.3.16.beta5"
gem "parallel", "0.5.11"
gem "parallel_tests"
gem "caldecott", "~> 0.0.4"
4 Gemfile.lock
View
@@ -63,7 +63,7 @@ GEM
terminal-table (1.4.4)
tilt (1.3.3)
uuidtools (2.1.2)
- vmc (0.3.16.beta.3)
+ vmc (0.3.16.beta.5)
addressable (~> 2.2.6)
interact (~> 0.4.0)
json_pure (>= 1.5.1, < 1.7.0)
@@ -92,4 +92,4 @@ DEPENDENCIES
rspec (= 1.3.0)
rubyzip (~> 0.9.4)
terminal-table
- vmc (>= 0.3.16.beta3)
+ vmc (>= 0.3.16.beta5)
7 Rakefile
View
@@ -100,7 +100,8 @@ TESTS_TO_BUILD = ["#{TESTS_PATH}/spring/auto-reconfig-test-app",
"#{TESTS_PATH}/grails/guestbook",
"#{TESTS_PATH}/java_web/java_tiny_app",
"#{TESTS_PATH}/lift/hello_lift",
- "#{TESTS_PATH}/lift/lift-db-app"
+ "#{TESTS_PATH}/lift/lift-db-app",
+ "#{TESTS_PATH}/standalone/java_app"
]
desc "Build the tests. If the git hash associated with the test assets has not changed, nothing is built. To force a build, invoke 'rake build[--force]'"
@@ -108,6 +109,10 @@ task :build, [:force] do |t, args|
puts "\nBuilding tests"
sh('git submodule update --init')
if build_required? args.force
+ prompt_message = "\nBVT need java development environment to build java-based test apps before pushing them to appcloud.\n
+Please run 'sudo aptitude install maven2 default-jdk' on your Linux box"
+ `mvn -v 2>&1`
+ raise prompt_message if $?.exitstatus != 0
ENV['MAVEN_OPTS']="-XX:MaxPermSize=256M"
TESTS_TO_BUILD.each do |test|
puts "\tBuilding '#{test}'"
2  assets
@@ -1 +1 @@
-Subproject commit ce672c132a61db6508267ba2df9e272bce58afbf
+Subproject commit ae01fbe1339f8984a42fd84cc37b28445a6da134
81 features/autostaging_standalone.feature
View
@@ -0,0 +1,81 @@
+Feature: Deploy standalone applications that make use of autostaging
+
+ As a user of Cloud Foundry
+ I want to launch apps that expect automatic binding of the services that they use
+
+ Background: standalone autostaging
+ Given I have registered and logged in
+
+ @ruby @sanity @services
+ Scenario: standalone ruby18 autostaging
+ Given I have deployed my application named standalone_ruby18_autoconfig
+ 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 crash and it should crash
+ When I provision mysql service
+ Then I post mysqlabc to mysql service with key abc
+ Then I should be able to get from mysql service with key abc, and I should see mysqlabc
+ Then I delete my service
+ When I provision redis service
+ Then I post redisabc to redis service with key abc
+ Then I should be able to get from redis service with key abc, and I should see redisabc
+ When I provision mongodb service
+ Then I post mongoabc to mongo service with key abc
+ Then I should be able to get from mongo service with key abc, and I should see mongoabc
+ When I provision rabbitmq service
+ Then I post rabbitabc to rabbitmq service with key abc
+ Then I should be able to get from rabbitmq service with key abc, and I should see rabbitabc
+ When I provision postgresql service
+ Then I post postgresqlabc to postgresql service with key abc
+ Then I should be able to get from postgresql service with key abc, and I should see postgresqlabc
+ Then I delete all my service
+ Then I delete my application
+
+ @ruby
+ Scenario: standalone ruby 19 autostaging
+ Given I have deployed my application named standalone_ruby19_autoconfig
+ 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 crash and it should crash
+ When I provision mysql service
+ Then I post mysqlabc to mysql service with key abc
+ Then I should be able to get from mysql service with key abc, and I should see mysqlabc
+ Then I delete my service
+ When I provision redis service
+ Then I post redisabc to redis service with key abc
+ Then I should be able to get from redis service with key abc, and I should see redisabc
+ When I provision mongodb service
+ Then I post mongoabc to mongo service with key abc
+ Then I should be able to get from mongo service with key abc, and I should see mongoabc
+ When I provision rabbitmq service
+ Then I post rabbitabc to rabbitmq service with key abc
+ Then I should be able to get from rabbitmq service with key abc, and I should see rabbitabc
+ When I provision postgresql service
+ Then I post postgresqlabc to postgresql service with key abc
+ Then I should be able to get from postgresql service with key abc, and I should see postgresqlabc
+ Then I delete all my service
+ Then I delete my application
+
+ @ruby
+ Scenario: standalone ruby opt-out of autostaging via config file
+ Given I have deployed my application named standalone_ruby_autoconfig_disabled_by_file
+ 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
+ When I provision redis service
+ Then I should be able to get from redis service with key connection, and I should see Connectionrefused-UnabletoconnecttoRedison127.0.0.1:6379
+ Then I delete all my service
+ Then I delete my application
+
+ @ruby
+ Scenario: standalone ruby opt-out of autostaging via cf-runtime gem
+ Given I have deployed my application named standalone_ruby_autoconfig_disabled_by_gem
+ 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
+ When I provision redis service
+ Then I should be able to get from redis service with key connection, and I should see Connectionrefused-UnabletoconnecttoRedison127.0.0.1:6379
+ Then I delete all my service
+ Then I delete my application
10 features/rails_console.feature
View
@@ -24,3 +24,13 @@ Feature: Deploy the rails canonical app and check the console
When I send tab completion puts to console of my application
Then I should get completion results puts from console of my application
Then I close console
+
+ @runs_rails_console
+ Scenario: rails test console stdout redirect
+ Given I have my running application named rails_console_test_app
+ When I first access console of my application
+ Then I should get responses irb():001:0> from console of my application
+ When I send command puts 'hi' to console of my application
+ Then I should get responses puts 'hi',hi,=> nil,irb():002:0> from console of my application
+ Then I close console
+
36 features/service_lifecycle.feature
View
@@ -115,3 +115,39 @@ Feature: Deploy the sinatra canonical app and test lifecycle APIs
Then I delete my service
Then I delete my application
+ @postgresql @snapshot
+ Scenario: Take postgresql snapshot and rollback to a certain snapshot
+ Given I have my running application named app_sinatra_service2
+ When I provision postgresql service
+ Then I check snapshot extension is enabled
+ Then I post postgresqlabc to postgresql service with key abc
+ Then I should be able to get from postgresql service with key abc, and I should see postgresqlabc
+ When I create a snapshot of postgresql service
+ Then I should be able to query snapshots for postgresql service
+ Then I post postgresqlabc2 to postgresql service with key abc
+ Then I should be able to get from postgresql service with key abc, and I should see postgresqlabc2
+ When I rollback to previous snapshot for postgresql service
+ Then I should be able to get from postgresql service with key abc, and I should see postgresqlabc
+ Then I delete my service
+ Then I delete my application
+
+ @postgresql @serialized
+ Scenario: Import and export serialized data for postgresql service
+ Given I have my running application named app_sinatra_service2
+ When I provision postgresql service
+ Then I post postgresqlabc to postgresql service with key abc
+ Then I should be able to get from postgresql service with key abc, and I should see postgresqlabc
+ When I create a serialized URL of postgresql service
+ Then I should be able to download data from serialized URL
+ Then I post postgresqlabc2 to postgresql service with key abc
+ Then I should be able to get from postgresql service with key abc, and I should see postgresqlabc2
+ When I import serialized data from URL of postgresql service
+ Then I should be able to get from postgresql service with key abc, and I should see postgresqlabc
+ Then I post postgresqlabc2 to postgresql service with key abc
+ Then I should be able to get from postgresql service with key abc, and I should see postgresqlabc2
+ When I import serialized data from request of postgresql service
+ Then I should be able to get from postgresql service with key abc, and I should see postgresqlabc
+ Then I delete my service
+ Then I delete my application
+
+
16 features/service_quota.feature
View
@@ -0,0 +1,16 @@
+Feature: services quota/limitation verification
+
+ @creates_postgresql_quota_service @creates_service_quota_app
+ Scenario: deploy service quota application with postgresql service
+ When I have postgresql max db size setting
+ Given I have registered and logged in
+ Given I have provisioned a postgresql service
+ Given I have deployed a service quota application that is bound to this service
+ Then I should be able to create a table
+ Then I should be able to insert data under quota
+ When I insert more data to be over quota
+ Then I should not be able to insert data any more
+ Then I should not be able to create objects any more
+ When I delete data from the table
+ Then I should be able to insert data again
+ Then I should be able to create objects
104 features/standalone_apps.feature
View
@@ -0,0 +1,104 @@
+@smoke
+Feature: Standalone application support
+
+ As a user of Cloud Foundry
+ I want to launch standalone apps
+
+ Background: Standalone app support
+ Given I have registered and logged in
+
+ @ruby
+ Scenario: Bundled app with ruby 1.8 runtime
+ Given I have deployed my application named standalone_ruby18_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 root and see it's running version 1.8
+ When I delete my application
+ Then it should not be on Cloud Foundry
+
+ @ruby
+ Scenario: Bundled app with ruby 1.9 runtime
+ Given I have deployed my application named standalone_ruby19_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 root and see it's running version 1.9
+ When I delete my application
+ Then it should not be on Cloud Foundry
+
+ @ruby
+ Scenario: Simple app with ruby 1.8 runtime and no URL
+ Given I have deployed my application named standalone_simple_ruby18_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 file logs/stdout.log and see running version 1.8
+ When I delete my application
+ Then it should not be on Cloud Foundry
+
+ @ruby
+ Scenario: Simple app with ruby 1.9 runtime and no URL
+ Given I have deployed my application named standalone_simple_ruby19_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 file logs/stdout.log and see running version 1.9
+ When I delete my application
+ Then it should not be on Cloud Foundry
+
+ @ruby
+ Scenario: With Java runtime
+ Given I have deployed my application named standalone_java_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 file logs/stdout.log and see Hello from the cloud. Java opts: -Xms256m -Xmx256m -Djava.io.tmpdir=appdir/temp
+ When I delete my application
+ Then it should not be on Cloud Foundry
+
+ @node
+ Scenario: With node runtime
+ Given I have deployed my application named standalone_node_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 root and see it's running version v0.4.12
+ When I delete my application
+ Then it should not be on Cloud Foundry
+
+ @node
+ Scenario: With node06 runtime
+ Given I have deployed my application named standalone_node06_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 root and see it's running version v0.6.8
+ When I delete my application
+ Then it should not be on Cloud Foundry
+
+ @ruby
+ Scenario: With quotes in command
+ Given I have deployed my application named standalone_simple_ruby18_quotes_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 file logs/stdout.log and see running version 1.8
+ When I delete my application
+ Then it should not be on Cloud Foundry
+
+ Scenario: With PHP runtime
+ Given I have deployed my application with runtime php named standalone_php_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 file logs/stdout.log and see Hello from VCAP
+ When I delete my application
+ Then it should not be on Cloud Foundry
+
+Scenario: With Python runtime
+ Given I have deployed my application with runtime python named standalone_python_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 file logs/stdout.log and see Hello, World!
+ When I delete my application
+ Then it should not be on Cloud Foundry
+
+Scenario: With Erlang runtime
+ Given I have deployed my application with runtime erlang named standalone_erlang_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 file logs/stdout.log and see Hello, world!
+ When I delete my application
+ Then it should not be on Cloud Foundry
20 features/step_definitions/appcloud_steps.rb
View
@@ -49,6 +49,10 @@
@token.should_not == nil
end
+Then /^I should be able to change my password$/ do
+ AppCloudHelper.instance.rotate_password.should_not == nil
+end
+
# Re-login
Given /^I have logged in$/ do
@@ -216,6 +220,16 @@
health.should == expected_health
end
+Given /^I have deployed my application with runtime (\w+) named (\w+)$/ do |runtime, app_name|
+ pending_unless_runtime_exists(runtime)
+ @app = create_app app_name, @token
+ upload_app @app, @token
+ start_app @app, @token
+ expected_health = 1.0
+ health = poll_until_done @app, expected_health, @token
+ health.should == expected_health
+end
+
Given /^I have built a simple Erlang application$/ do
# Try to find an appropriate Erlang
erlang_ready = true
@@ -661,6 +675,12 @@
contents.close
end
+Then /^I should be able to access my application file (\S+) and see (.+)$/ do |file, expected_contents|
+ @instance = '0'
+ response = get_app_files @app, @instance, file, @token
+ response.should == expected_contents
+end
+
Then /^I should be able to access my application root and see hello from (\w+)$/ do |framework|
contents = get_app_contents @app
contents.should_not == nil
106 features/step_definitions/service_quota.rb
View
@@ -0,0 +1,106 @@
+When /^I have postgresql max db size setting$/ do
+ unless @service_quota_pg_maxdbsize
+ pending "service quota: postgresql max db size is not provided."
+ end
+end
+
+Given /^I have provisioned a postgresql service$/ do
+ pending unless find_service 'postgresql'
+ @postgresql_quota_service = provision_postgresql_quota_service
+ @postgresql_quota_service.should_not == nil
+end
+
+Given /^I have deployed a service quota application that is bound to this service$/ do
+ @app = create_app SERVICE_QUOTA_APP, @token
+ attach_provisioned_service @app, @postgresql_quota_service, @token
+ upload_app @app, @token
+ start_app @app, @token
+ expected_health = 1.0
+ health = poll_until_done @app, expected_health, @token
+ health.should == expected_health
+end
+
+Then /^I should be able to create a table$/ do
+ uri = get_uri(@app, '/service/postgresql/tables/quota_table')
+ r = post_uri(uri, '')
+ r.response_code.should == 200
+ r.body_str.should == 'quota_table'
+ r.close
+end
+
+Then /^I should be able to insert data under quota$/ do
+ mega = @service_quota_pg_maxdbsize.to_i - 1
+ uri = get_uri(@app, "/service/postgresql/tables/quota_table/#{mega}")
+ r = post_uri(uri, '')
+ r.response_code.should == 200
+ r.body_str.should == 'ok'
+ r.close
+end
+
+When /^I insert more data to be over quota$/ do
+ uri = get_uri(@app, '/service/postgresql/tables/quota_table/2')
+ r = post_uri(uri, '')
+ r.response_code.should == 200
+ r.close
+ sleep 2
+end
+
+Then /^I should not be able to insert data any more$/ do
+ uri = get_uri(@app, '/service/postgresql/tables/quota_table/2')
+ r = post_uri(uri, '')
+ r.response_code.should == 200
+ r.body_str.should == "ERROR: permission denied for relation quota_table\n"
+ r.close
+end
+
+Then /^I should not be able to create objects any more$/ do
+ uri = get_uri(@app, '/service/postgresql/tables/test_table')
+ r = post_uri(uri, '')
+ r.response_code.should == 200
+ r.body_str.should == "ERROR: permission denied for schema public\n"
+ #
+ uri = get_uri(@app, '/service/postgresql/functions/test_func')
+ r = post_uri(uri, '')
+ r.response_code.should == 200
+ r.body_str.should == "ERROR: permission denied for schema public\n"
+ #
+ uri = get_uri(@app, '/service/postgresql/sequences/test_seq')
+ r = post_uri(uri, '')
+ r.response_code.should == 200
+ r.body_str.should == "ERROR: permission denied for schema public\n"
+ r.close
+end
+
+When /^I delete data from the table$/ do
+ uri = get_uri(@app, '/service/postgresql/tables/quota_table/data')
+ r = delete_uri(uri)
+ r.response_code.should == 200
+ r.close
+ sleep 2
+end
+
+Then /^I should be able to insert data again$/ do
+ uri = get_uri(@app, '/service/postgresql/tables/quota_table/2')
+ r = post_uri(uri, '')
+ r.response_code.should == 200
+ r.body_str.should == 'ok'
+ r.close
+end
+
+Then /^I should be able to create objects$/ do
+ uri = get_uri(@app, '/service/postgresql/tables/test_table')
+ r = post_uri(uri, '')
+ r.response_code.should == 200
+ r.body_str.should == 'test_table'
+ #
+ uri = get_uri(@app, '/service/postgresql/functions/test_func')
+ r = post_uri(uri, '')
+ r.response_code.should == 200
+ r.body_str.should == 'test_func'
+ #
+ uri = get_uri(@app, '/service/postgresql/sequences/test_seq')
+ r = post_uri(uri, '')
+ r.response_code.should == 200
+ r.body_str.should == 'test_seq'
+ r.close
+end
60 features/support/env.rb
View
@@ -60,6 +60,7 @@
JAVA_APP_WITH_STARTUP_DELAY = "java_app_with_startup_delay"
RAILS_CONSOLE_TEST_APP = "rails_console_test_app"
VBLOB_APP = "vblob_app"
+SERVICE_QUOTA_APP = "service_quota_app"
class Fixnum
def to_json(options = nil)
@@ -91,6 +92,7 @@ def initialize
@resources_uri = "#{@base_uri}/resources"
@services_uri = "#{@base_uri}/services"
@suggest_url = @target
+ @service_quota_pg_maxdbsize = ENV['VCAP_BVT_SERVICE_PG_MAXDBSIZE']
puts "\n** VCAP_BVT_TARGET = '#{@target}' (set environment variable to override) **"
puts "** Running as user: '#{test_user}' (set environment variables VCAP_BVT_USER / VCAP_BVT_USER_PASSWD to override) **"
@@ -191,6 +193,7 @@ def cleanup
delete_app_internal(JAVA_APP_WITH_STARTUP_DELAY)
delete_app_internal(RAILS_CONSOLE_TEST_APP)
delete_app_internal(VBLOB_APP)
+ delete_app_internal(SERVICE_QUOTA_APP)
delete_services(all_my_services) unless @registered_user or !get_login_token
# This used to delete the entire user, but that now requires admin
# privs so it was removed, as was the delete_user method. See the
@@ -224,6 +227,15 @@ def register
@last_registered_user = test_user
end
+ def rotate_password
+ new_password = test_passwd + "-2"
+ @client.change_password new_password
+ token_a = @client.login(test_user, new_password)
+ @client.change_password test_passwd
+ token_b = @client.login(test_user, test_passwd)
+ token_b if token_a
+ end
+
def login
token = @client.login(test_user, test_passwd)
# TBD - ABS: This is a hack around the 1 sec granularity of our token time stamp
@@ -254,7 +266,8 @@ def get_app_info app_list, app
def create_app app, token, instances=1
appname = get_app_name app
delete_app app, token
- url = create_uri appname
+ uris = []
+ uris << create_uri(appname) if not @config[app]['no_url']
manifest = {
:name => "#{appname}",
:staging => {
@@ -264,9 +277,10 @@ def create_app app, token, instances=1
:resources=> {
:memory => @config[app]['memory'] || 64
},
- :uris => [url],
- :instances => "#{instances}",
+ :uris => uris,
+ :instances => "#{instances}"
}
+ manifest[:staging][:command] = @config[app]['command'] if @config[app]['command']
response = @client.create_app(appname, manifest)
if response.first == 400
puts "Creation of app #{appname} failed"
@@ -339,18 +353,6 @@ def upload_app_help(app_dir, app)
FileUtils.rm_rf(explode_dir) if explode_dir
end
- def update_app_help(app_dir, app)
- appname = get_app_name app
- manifest = {
- :name => "#{appname}",
- :staging => {
- :model => @config[app]['framework'],
- :stack => @config[app]['startup']
- }
- }
- @client.update_app(appname , manifest)
- end
-
def get_app_status app, token
appname = get_app_name app
begin
@@ -594,6 +596,13 @@ def pending_unless_framework_exists(token, framework)
end
end
+ def pending_unless_runtime_exists(runtime)
+ runtimes = @client.info().to_a().join()
+ unless (runtimes =~ /#{runtime}/)
+ pending "Not running test because runtime #{runtime} is not available in this Cloud Foundry instance"
+ end
+ end
+
def provision_rabbitmq_srs_service token
name = "#{@namespace}#{@app || 'simple_rabbitmq_srs_app'}rabbitmq_srs"
@client.create_service('rabbitmq-srs', name)
@@ -658,6 +667,19 @@ def provision_atmos_service token
}
end
+ def provision_postgresql_quota_service
+ name = "#{@namespace}#{@app || 'db_quota_app'}postgresql"
+ @client.create_service(:postgresql, name)
+ service_manifest = {
+ :type=>"database",
+ :vendor=>"postgresql",
+ :tier=>"free",
+ :version=>"9.0",
+ :name=>name,
+ :options=>{"size"=>"128MiB"},
+ }
+ end
+
def provision_brokered_service token
name = "#{@namespace}#{@app || 'brokered_service_app'}_#{@brokered_service_name}"
@client.create_service(@brokered_service_name.to_sym, name)
@@ -909,6 +931,14 @@ def put_record uri, data_hash
easy.close
end
+ def delete_uri uri
+ easy = Curl::Easy.new
+ easy.url = uri
+ easy.resolve_mode =:ipv4
+ easy.http_delete
+ easy
+ end
+
def delete_from_app app, relative_path
uri = get_uri app, relative_path
delete_record uri
10 features/support/hooks.rb
View
@@ -199,3 +199,13 @@
After("@creates_spring_env_app") do |scenario|
delete_app_services_check
end
+
+# service quota
+
+After("@creates_service_quota_app") do |scenario|
+ delete_app @app, @token if @app
+end
+
+After("@creates_postgresql_quota_service") do |scenario|
+ delete_service @postgresql_quota_service[:name] if @postgresql_quota_service
+end
165 features/support/testconfig.yml
View
@@ -8,115 +8,96 @@ sleep_secs: 1
simple_app:
framework: "http://b20nine.com/unknown"
- startup: "ruby foo.rb"
memory: 128
path: "assets/sinatra/hello_vcap"
simple_app2:
framework: "http://b20nine.com/unknown"
- startup: "ruby foo.rb"
memory: 64
path: "assets/sinatra/hello_vcap"
simple_app3:
framework: "http://b20nine.com/unknown"
- startup: "ruby foo.rb"
memory: 64
path: "assets/sinatra/hello_vcap"
tiny_java_app:
framework: "java_web/1.0"
- startup: "thin start"
memory: 128
path: "assets/java_web/java_tiny_app/target"
simple_db_app:
framework: "http://b20nine.com/unknown"
- startup: "ruby simple_db_app.rb"
memory: 128
path: "assets/sinatra/simple_db_app"
redis_lb_app:
framework: "http://b20nine.com/unknown"
- startup: "ruby redis_lb.rb"
memory: 128
path: "assets/sinatra/redis_lb_app"
env_test_app:
framework: "http://b20nine.com/unknown"
- startup: "ruby env_test.rb"
memory: 64
path: "assets/sinatra/env_test_app"
broken_app:
framework: "http://b20nine.com/unknown"
- startup: "ruby broken.rb"
memory: 64
path: "assets/sinatra/broken_app"
rails3_app:
framework: "rails/1.0"
- startup: "thin start"
memory: 128
path: "assets/rails3/rails3_app"
jpa_app:
framework: "spring_web/1.0"
- startup: "thin start"
memory: 512
path: "assets/spring/jpa-guestbook/target"
hibernate_app:
framework: "spring_web/1.0"
- startup: "thin start"
memory: 512
path: "assets/spring/hibernate-guestbook/target"
dbrails_app:
framework: "rails/1.0"
- startup: "thin start"
memory: 128
path: "assets/rails3/dbrails_app"
dbrails_broken_app:
framework: "rails/1.0"
- startup: "thin start"
memory: 128
path: "assets/rails3/dbrails_broken_app"
grails_app:
framework: "grails/1.0"
- startup: "thin start"
memory: 512
path: "assets/grails/guestbook/target"
roo_app:
framework: "spring_web/1.0"
- startup: "thin start"
memory: 256
path: "assets/spring/roo-guestbook/target"
mochiweb_test:
framework: "otp_rebar"
- startup: erlangR14B02
memory: 64
path: "assets/mochiweb/mochiweb_test/rel/mochiweb_test"
simple-lift-app:
framework: "lift/1.0"
- startup: "thin start"
memory: 256
path: "assets/lift/hello_lift/target"
lift-db-app:
framework: "lift/1.0"
- startup: "thin start"
memory: 256
path: "assets/lift/lift-db-app/target"
tomcat-version-check-app:
framework: "spring_web/1.0"
- startup: "thin start"
memory: 128
tomcat_version: "6.0.35"
path: "assets/java_web/tomcat-version-check-app/target"
@@ -135,31 +116,26 @@ app_rails_version19:
app_rails_service:
framework: "rails/1.0"
- startup: "thin start"
memory: 256
path: "assets/rails3/app_rails_service"
app_rails_service_autoconfig:
framework: "rails/1.0"
- startup: "thin start"
memory: 256
path: "assets/rails3/app_rails_service_autoconfig"
rails_autoconfig_disabled_by_file:
framework: "rails/1.0"
- startup: "thin start"
memory: 256
path: "assets/rails3/autoconfig_disabled_by_file"
rails_autoconfig_disabled_by_gem:
framework: "rails/1.0"
- startup: "thin start"
memory: 256
path: "assets/rails3/autoconfig_disabled_by_gem"
app_rack_service:
framework: "rack"
- startup: "ruby main.rb"
memory: 256
path: "assets/rack/app_rack_service"
@@ -190,50 +166,42 @@ rack_autoconfig_disabled_by_gem:
app_sinatra_service:
framework: "http://b20nine.com/unknown"
- startup: "ruby main.rb"
memory: 256
path: "assets/sinatra/app_sinatra_service"
app_sinatra_service2:
framework: "http://b20nine.com/unknown"
- startup: "ruby main.rb"
memory: 256
path: "assets/sinatra/app_sinatra_service"
app_sinatra_service_autoconfig:
framework: "http://b20nine.com/unknown"
- startup: "ruby app.rb"
memory: 64
path: "assets/sinatra/app_sinatra_service_autoconfig"
amqp_autoconfig:
framework: "sinatra"
- startup: "ruby app.rb"
memory: 64
runtime: ruby19
path: "assets/sinatra/amqp_autoconfig"
autoconfig_unsupported_versions:
framework: "http://b20nine.com/unknown"
- startup: "ruby app.rb"
memory: 64
path: "assets/sinatra/autoconfig_unsupported_versions"
autoconfig_unsupported_carrot_version:
framework: "http://b20nine.com/unknown"
- startup: "ruby app.rb"
memory: 64
path: "assets/sinatra/autoconfig_unsupported_carrot_version"
sinatra_autoconfig_disabled_by_file:
framework: "http://b20nine.com/unknown"
- startup: "ruby app.rb"
memory: 64
path: "assets/sinatra/autoconfig_disabled_by_file"
sinatra_autoconfig_disabled_by_gem:
framework: "http://b20nine.com/unknown"
- startup: "ruby app.rb"
memory: 64
path: "assets/sinatra/autoconfig_disabled_by_gem"
@@ -257,19 +225,16 @@ app_node_version06:
app_spring_service:
framework: "spring_web/1.0"
- startup: "thin start"
memory: 512
path: "assets/spring/app_spring_service/target"
my_test_app_env_test_app:
framework: "http://b20nine.com/unknown"
- startup: "ruby foo.rb"
memory: 64
path: "assets/sinatra/hello_vcap"
neo4j_app:
framework: "http://b20nine.com/unknown"
- startup: "ruby neo4j.rb"
memory: 128
path: "assets/sinatra/neo4j_app"
@@ -290,60 +255,170 @@ simple_django_app:
simple_php_app:
framework: "php"
- startup: php
memory: 64
path: "assets/php/simple_php_app"
spring-env-app:
framework: "spring_web/1.0"
- startup: "thin start"
memory: 256
path: "assets/spring/spring-env/target"
auto-reconfig-test-app:
framework: "spring_web/1.0"
- startup: "thin start"
memory: 512
path: "assets/spring/auto-reconfig-test-app/target"
auto-reconfig-missing-deps-test-app:
framework: "spring_web/1.0"
- startup: "thin start"
memory: 256
path: "assets/spring/auto-reconfig-missing-deps-test-app/target"
atmos_app:
framework: "http://b20nine.com/unknown"
- startup: "ruby server.rb"
memory: 256
path: "assets/sinatra/atmos_app"
simple_kv_app:
framework: "http://b20nine.com/unknown"
- startup: "thin start"
memory: 64
path: "assets/sinatra/simple_kv_app"
brokered_service_app:
framework: "http://b20nine.com/unknown"
- startup: "thin start"
memory: 64
path: "assets/sinatra/brokered_service_app"
java_app_with_startup_delay:
framework: "java_web/1.0"
- startup: "thin start"
memory: 128
path: "assets/java_web/app_with_startup_delay/target"
rails_console_test_app:
framework: "rails/1.0"
- startup: "thin start"
memory: 256
path: "assets/rails3/app_rails_service"
vblob_app:
framework: "http://b20nine.com/unknown"
- startup: "ruby vblob.rb"
memory: 256
path: "assets/sinatra/vblob_app"
+
+service_quota_app:
+ framework: "http://b20nine.com/unknown"
+ startup: "ruby main.rb"
+ memory: 512
+ path: "assets/sinatra/app_sinatra_service_quota/"
+
+standalone_ruby18_app:
+ framework: "standalone"
+ command: "bundle exec ruby main.rb -p $VCAP_APP_PORT"
+ memory: 256
+ runtime: ruby18
+ path: "assets/standalone/ruby_app"
+
+standalone_ruby19_app:
+ framework: "standalone"
+ command: "bundle exec ruby main.rb -p $VCAP_APP_PORT"
+ memory: 256
+ runtime: ruby19
+ path: "assets/standalone/ruby_app"
+
+standalone_simple_ruby18_app:
+ framework: "standalone"
+ command: "ruby simple.rb"
+ memory: 256
+ runtime: ruby18
+ path: "assets/standalone/simple_ruby_app"
+ no_url: true
+
+standalone_simple_ruby18_quotes_app:
+ framework: "standalone"
+ command: "ruby \"simple.rb\""
+ memory: 256
+ runtime: ruby18
+ path: "assets/standalone/simple_ruby_app"
+ no_url: true
+
+standalone_simple_ruby19_app:
+ framework: "standalone"
+ command: "ruby simple.rb"
+ memory: 256
+ runtime: ruby19
+ path: "assets/standalone/simple_ruby_app"
+ no_url: true
+
+standalone_java_app:
+ framework: "standalone"
+ command: "bin/hello-cloud"
+ runtime: java
+ memory: 256
+ path: "assets/standalone/java_app/target/appassembler"
+ no_url: true
+
+standalone_node_app:
+ framework: "standalone"
+ command: "node app.js"
+ runtime: node
+ memory: 64
+ path: "assets/standalone/node_app"
+
+standalone_node06_app:
+ framework: "standalone"
+ command: "node app.js"
+ runtime: node06
+ memory: 64
+ path: "assets/standalone/node_app"
+
+standalone_ruby18_autoconfig:
+ framework: "standalone"
+ command: "bundle exec ruby app.rb -p $VCAP_APP_PORT"
+ runtime: ruby18
+ memory: 64
+ path: "assets/standalone/ruby_autoconfig"
+
+standalone_ruby19_autoconfig:
+ framework: "standalone"
+ command: "bundle exec ruby app.rb -p $VCAP_APP_PORT"
+ runtime: ruby19
+ memory: 64
+ path: "assets/standalone/ruby_autoconfig"
+
+standalone_ruby_autoconfig_disabled_by_file:
+ framework: "standalone"
+ command: "bundle exec ruby app.rb -p $VCAP_APP_PORT"
+ runtime: ruby18
+ memory: 64
+ path: "assets/standalone/ruby_autoconfig_disabled_by_file"
+
+standalone_ruby_autoconfig_disabled_by_gem:
+ framework: "standalone"
+ command: "bundle exec ruby app.rb -p $VCAP_APP_PORT"
+ runtime: ruby18
+ memory: 64
+ path: "assets/standalone/ruby_autoconfig_disabled_by_gem"
+
+standalone_php_app:
+ framework: "standalone"
+ command: "php index.php"
+ runtime: php
+ memory: 64
+ path: "assets/standalone/php_app"
+ no_url: true
+
+standalone_python_app:
+ framework: "standalone"
+ command: "python HelloWorld.py"
+ runtime: python2
+ memory: 64
+ path: "assets/standalone/python_app"
+ no_url: true
+
+standalone_erlang_app:
+ framework: "standalone"
+ command: "erl -noshell -s helloworld start -s"
+ runtime: erlangR14B02
+ memory: 64
+ path: "assets/standalone/erlang_app"
+ no_url: true
+
+
29 features/user_management.feature
View
@@ -1,21 +1,22 @@
@smoke
Feature: User registration with and establishment of an authentication token with AppCloud
- In order to track service and resource usage
- As the AppCloud service provider
- I want users to register and login to use AppCloud.
+ In order to track service and resource usage
+ As the AppCloud service provider
+ I want users to register and login to use AppCloud.
- Scenario: Register user
- Given I am a new user to AppCloud
- When I register
- Then I should be able to login to AppCloud.
+ Scenario: Register user
+ Given I am a new user to AppCloud
+ When I register
+ Then I should be able to login to AppCloud.
- Scenario: Login user
- Given I am registered
- When I login
- Then I should get an authentication token that I need to use with all subsequent AppCloud requests
+ Scenario: User account access
+ Given I am registered
+ When I login
+ Then I should get an authentication token that I need to use with all subsequent AppCloud requests
+ Then I should be able to change my password
- Scenario: Reset user authentication token
+ Scenario: Reset user authentication token
Given I have registered and logged in
- When I login
- Then I should get a new authentication token that I need to use for all subsequent AppCloud requests
+ When I login
+ Then I should get a new authentication token that I need to use for all subsequent AppCloud requests

No commit comments for this range

Something went wrong with that request. Please try again.