Permalink
Browse files

Run tests against ng environment

- Use cfoundry instead of vmc
  • Loading branch information...
1 parent a09390e commit 5bc5b892e49dcb6574605cfd3f551398936b42f2 Bleicke and Maria Shaldibina committed Mar 7, 2013
@@ -2,5 +2,5 @@ source "http://rubygems.org"
gem "rake", "~> 0.9.2"
gem "rspec", "~> 2.13"
gem "ci_reporter", "~> 1.6.5"
-gem "vmc"
+gem "cfoundry", "~> 0.5.2"
gem "curb"
@@ -1,19 +1,21 @@
GEM
remote: http://rubygems.org/
specs:
- addressable (2.2.6)
- builder (3.0.0)
- ci_reporter (1.6.8)
+ builder (3.2.0)
+ cf-uaa-lib (1.3.7)
+ multi_json
+ cfoundry (0.5.2)
+ cf-uaa-lib (~> 1.3.3)
+ multi_json (~> 1.3)
+ multipart-post (~> 1.1)
+ rubyzip (~> 0.9)
+ ci_reporter (1.6.9)
builder (>= 2.1.2)
- curb (0.7.16)
+ curb (0.8.3)
diff-lcs (1.2.1)
- interact (0.3)
- json_pure (1.5.4)
- spruz (~> 0.2.8)
- mime-types (1.17.2)
- rake (0.9.2.2)
- rest-client (1.6.7)
- mime-types (>= 1.16)
+ multi_json (1.6.1)
+ multipart-post (1.2.0)
+ rake (0.9.6)
rspec (2.13.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
@@ -22,23 +24,14 @@ GEM
rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.0)
- rubyzip2 (2.0.2)
- spruz (0.2.13)
- terminal-table (1.4.4)
- vmc (0.3.14)
- addressable (~> 2.2.6)
- interact (~> 0.3.0)
- json_pure (~> 1.5.1)
- rest-client (>= 1.6.1, < 1.7.0)
- rubyzip2 (~> 2.0.1)
- terminal-table (~> 1.4.2)
+ rubyzip (0.9.9)
PLATFORMS
ruby
DEPENDENCIES
+ cfoundry (~> 0.5.2)
ci_reporter (~> 1.6.5)
curb
rake (~> 0.9.2)
rspec (~> 2.13)
- vmc
@@ -27,7 +27,7 @@
def write_to_rabbit(key, value)
EventMachine.run do
- connection = CFRuntime::AMQPClient.create_from_svc('test-cfruntime-svc-test-rabbit')
+ connection = CFRuntime::AMQPClient.create_from_svc('amqp-name-cfruntime-svc-test-rabbit')
channel = AMQP::Channel.new(connection)
queue = channel.queue(key, :auto_delete => true)
exchange = channel.default_exchange
@@ -107,33 +107,33 @@
end
def load_redis
- CFRuntime::RedisClient.create_from_svc('test-cfruntime-svc-test-redis')
+ CFRuntime::RedisClient.create_from_svc('test-name-cfruntime-svc-test-redis')
end
def load_mysql
- client = CFRuntime::Mysql2Client.create_from_svc('test-cfruntime-svc-test-mysql')
+ client = CFRuntime::Mysql2Client.create_from_svc('test-name-cfruntime-svc-test-mysql')
result = client.query("SELECT table_name FROM information_schema.tables WHERE table_name = 'data_values'");
client.query("Create table IF NOT EXISTS data_values ( id varchar(20), data_value varchar(20)); ") if result.count != 1
client
end
def load_mongo
- db = CFRuntime::MongoClient.create_from_svc('test-cfruntime-svc-test-mongo').db
+ db = CFRuntime::MongoClient.create_from_svc('test-name-cfruntime-svc-test-mongo').db
coll = db['data_values']
end
def load_postgresql
- client = CFRuntime::PGClient.create_from_svc('test-cfruntime-svc-test-postgresql')
+ client = CFRuntime::PGClient.create_from_svc('test-name-cfruntime-svc-test-postgresql')
client.query("create table data_values (id varchar(20), data_value varchar(20));") if client.query("select * from information_schema.tables where table_name = 'data_values';").first.nil?
client
end
def load_blob
- CFRuntime::AWSS3Client.create_from_svc('test-cfruntime-svc-test-blob')
+ CFRuntime::AWSS3Client.create_from_svc('test-name-cfruntime-svc-test-blob')
end
def rabbit_service
- CFRuntime::CarrotClient.create_from_svc('test-cfruntime-svc-test-rabbit')
+ CFRuntime::CarrotClient.create_from_svc('test-name-cfruntime-svc-test-rabbit')
end
def write_to_rabbit(key, value, client)
@@ -8,14 +8,16 @@
describe "connects an application to services by type" do
before(:all) do
login
+ delete_app
+ delete_services
deploy_app("service_bindings_by_type")
- TEST_SERVICES.each { |service_name| provision_service(service_name) }
+ TEST_SERVICES.each { |service_name| provision_service(service_name, "test-type") }
start_app
end
after(:all) do
- delete_services(all_my_services)
delete_app
+ delete_services
end
TEST_SERVICES.each do |service_name|
@@ -28,14 +30,15 @@
describe "connects an application to services by name" do
before(:all) do
login
+ delete_services
deploy_app("service_bindings_by_name")
- TEST_SERVICES.each { |service_name| provision_service(service_name) }
+ TEST_SERVICES.each { |service_name| provision_service(service_name, "test-name") }
start_app
end
after(:all) do
- delete_services(all_my_services)
delete_app
+ delete_services
end
TEST_SERVICES.each do |service_name|
@@ -50,14 +53,15 @@
describe "connects an application using AMQP to rabbit service by type" do
before do
login
+ delete_services
deploy_app("amqp_service_bindings_by_type")
- provision_service(:rabbitmq)
+ provision_service(:rabbitmq, "amqp-type")
start_app
end
after do
- delete_services(all_my_services)
delete_app
+ delete_services
end
it "connects to rabbitmq by type" do
@@ -70,13 +74,14 @@
describe "connects an application using AMQP to rabbit service by name" do
before do
login
+ delete_services
deploy_app("amqp_service_bindings_by_name")
- provision_service(:rabbitmq)
+ provision_service(:rabbitmq, "amqp-name")
start_app
end
after do
- delete_services(all_my_services)
+ delete_services
delete_app
end
Oops, something went wrong.

0 comments on commit 5bc5b89

Please sign in to comment.