From: Tomas Sedovic tsedovic@redhat.com
This tends to trip people up: aeolus-configure sets up a Deltacloud server with the Mock driver on the port 3002.
However, our tests look for the mock dc instance on 3001, which means that to run the tests, one must start another Mock Deltacloud server.
This makes tests use 3002 instead. Therefore, if you have the Conductor set up for production (e.g. installed from RPMs), the tests will use the Deltacloud server that came with it.
Otherwise, you'll still have to start it manually -- listening on the port 3002 from now on. --- src/features/provider.feature | 8 ++++---- src/spec/factories/provider.rb | 12 ++---------- 2 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/src/features/provider.feature b/src/features/provider.feature index ef89ea5..78f4de8 100644 --- a/src/features/provider.feature +++ b/src/features/provider.feature @@ -35,9 +35,9 @@ Feature: Manage Providers And each provider should have "provider_type" And there should be these provider: | name | url | provider_type | - | provider1 | http://localhost:3001/api | mock | - | provider2 | http://localhost:3001/api | mock | - | provider3 | http://localhost:3001/api | mock | + | provider1 | http://localhost:3002/api | mock | + | provider2 | http://localhost:3002/api | mock | + | provider3 | http://localhost:3002/api | mock |
Scenario: Show provider details Given there is a provider named "testprovider" @@ -52,7 +52,7 @@ Feature: Manage Providers When I follow "New Provider" Then I should be on the new provider page When I fill in "provider[name]" with "testprovider" - And I fill in "provider[url]" with "http://localhost:3001/api" + And I fill in "provider[url]" with "http://localhost:3002/api" And I select "Amazon EC2" from "provider_provider_type_id" And I press "Save" Then I should be on the providers page diff --git a/src/spec/factories/provider.rb b/src/spec/factories/provider.rb index 243a7e4..e10a879 100644 --- a/src/spec/factories/provider.rb +++ b/src/spec/factories/provider.rb @@ -6,7 +6,7 @@ end
Factory.define :mock_provider, :parent => :provider do |p| p.provider_type {ProviderType.find_by_codename("mock")} - p.url 'http://localhost:3001/api' + p.url 'http://localhost:3002/api' p.hardware_profiles { |hp| [hp.association(:mock_hwp1), hp.association(:mock_hwp2)] } p.after_create { |p| p.realms << Factory(:realm1, :provider => p) << Factory(:realm2, :provider => p) } end @@ -14,21 +14,13 @@ end Factory.define :mock_provider2, :parent => :provider do |p| p.name 'mock2' p.provider_type { ProviderType.find_by_codename("mock") } - p.url 'http://localhost:3001/api' + p.url 'http://localhost:3002/api' p.after_create { |p| p.realms << Factory(:realm3, :provider => p) } end
Factory.define :ec2_provider, :parent => :provider do |p| p.name 'amazon-ec2' p.provider_type { ProviderType.find_by_codename("ec2") } - p.url 'http://localhost:3001/api' - p.hardware_profiles { |hp| [hp.association(:ec2_hwp1)] } - p.after_create { |p| p.realms << Factory(:realm4, :provider => p) } -end - -Factory.define :ec2_provider_no_builds, :parent => :provider do |p| - p.name 'amazon-ec2-no-builds' - p.provider_type { ProviderType.find_by_codename("ec2") } p.url 'http://localhost:3002/api' p.hardware_profiles { |hp| [hp.association(:ec2_hwp1)] } p.after_create { |p| p.realms << Factory(:realm4, :provider => p) }