[PATCH conductor] Fixed cucumber tests
by Jan Provazník
From: Jan Provaznik <jprovazn(a)redhat.com>
This patch fixes cucumber tests which were failing iw iwhd was down
(introduced my older patch 2628b0019825eae76439e05e1b000015f50b7b13)
---
src/features/provider.feature | 1 +
src/features/provider_account.feature | 2 ++
src/features/step_definitions/provider_steps.rb | 4 ++++
3 files changed, 7 insertions(+)
diff --git a/src/features/provider.feature b/src/features/provider.feature
index a267206..0d5e69a 100644
--- a/src/features/provider.feature
+++ b/src/features/provider.feature
@@ -45,6 +45,7 @@ Feature: Manage Providers
And this provider has 5 hardware profiles
And this provider has a realm
And this provider has a provider account
+ And there is not a provider account with provider images
When I go to the mock1's edit provider page
And I follow "delete"
Then there should not exist a provider named "mock1"
diff --git a/src/features/provider_account.feature b/src/features/provider_account.feature
index 9581076..e0e516d 100644
--- a/src/features/provider_account.feature
+++ b/src/features/provider_account.feature
@@ -50,6 +50,7 @@ Feature: Manage Provider Accounts
And there is a provider account named "testaccount"
And the account has an instance associated with it
And I am on the mockprovider's provider accounts page
+ And there is not a provider account with provider images
When I check the "testaccount" account
And I press "Delete"
Then I should be on the mockprovider's edit provider page
@@ -68,6 +69,7 @@ Feature: Manage Provider Accounts
And the account has an instance associated with it
And all the account instances are stopped
And I am on the mockprovider's provider accounts page
+ And there is not a provider account with provider images
When I check the "testaccount" account
And I press "Delete"
Then I should be on the mockprovider's edit provider page
diff --git a/src/features/step_definitions/provider_steps.rb b/src/features/step_definitions/provider_steps.rb
index d52cb7a..e007df1 100644
--- a/src/features/step_definitions/provider_steps.rb
+++ b/src/features/step_definitions/provider_steps.rb
@@ -138,6 +138,10 @@ Given /^this provider has a provider account$/ do
FactoryGirl.create(:mock_provider_account, :provider => @provider)
end
+Given /^there is not a provider account with provider images$/ do
+ ProviderAccount.any_instance.stub(:provider_images).and_return([])
+end
+
Then /^there should not be any hardware profiles$/ do
HardwareProfile.find(:all, :conditions => { :provider_id => @provider.id} ).size.should == 0
end
--
1.7.11.2
11 years, 8 months
[PATCH conductor] Minor text changes.
by Brian McLaughlin
Changes include changing header "Log out" link to "Log Out" for consistency and removing the copyright text from the footer for upstream.
11 years, 8 months
[PATCH conductor] rhevm launch fixes (rev. 2)
by Jan Provazník
Resending the patchset, changes in this version:
- 'def self.up' used in migration instead of 'def up'
(default in new rails) because older rails then silently
ignores the migration
- disabled useless starting of instances if a deployment
is in rollback/failed mode
11 years, 8 months
[PATCH conductor] BZ 801527: wrong error message when imagefactory is down
by Maros Zatko
From: Maros Zatko <mzatko(a)redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=801527
API:
* new API exception ServiceUnavailable
* rescue for ECONNREFUSED when imagefactory is down
---
src/app/controllers/api/images_controller.rb | 14 +++++++++-----
src/lib/exceptions.rb | 1 +
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/app/controllers/api/images_controller.rb b/src/app/controllers/api/images_controller.rb
index 465a20b..2bcbeee 100644
--- a/src/app/controllers/api/images_controller.rb
+++ b/src/app/controllers/api/images_controller.rb
@@ -89,11 +89,15 @@ module Api
:template => @tpl.uuid,
:environment => @pool_family.name
})
- @image = Aeolus::Image::Factory::Image.new(:id => iwhd_image.id)
- @image.targets = req[:params][:targets]
- @image.template = req[:params][:template]
- @image.save!
- respond_with(@image)
+ begin
+ @image = Aeolus::Image::Factory::Image.new(:id => iwhd_image.id)
+ @image.targets = req[:params][:targets]
+ @image.template = req[:params][:template]
+ @image.save!
+ respond_with(@image)
+ rescue Errno::ECONNREFUSED
+ raise(Aeolus::Conductor::API::ServiceUnavailable.new(503, 'Imagefactory is dead, Jim!'))
+ end
elsif req[:type] == :import
account = ProviderAccount.find_by_label(req[:params][:provider_account_name])
raise(Aeolus::Conductor::API::ProviderAccountNotFound.new(404, t("api.error_messages.provider_account_not_found",
diff --git a/src/lib/exceptions.rb b/src/lib/exceptions.rb
index d56ddb3..9b1edab 100644
--- a/src/lib/exceptions.rb
+++ b/src/lib/exceptions.rb
@@ -38,6 +38,7 @@ module Aeolus
class ProviderImageDeleteFailure < Error; end
class ProviderImageNotFound < Error; end
class ProviderImageStatusNotFound < Error; end
+ class ServiceUnavailable < Error; end
class TargetImageDeleteFailure < Error; end
class TargetImageNotFound < Error; end
class TargetImageStatusNotFound < Error; end
--
1.7.7.6
11 years, 8 months
New Buttons - feedback needed
by Jaromir Coufal
Hello guys,
I have prepared new buttons. You can find them here:
http://codepen.io/coufalj/pen/LeDbF
Please let me know, if you think that we need some additional types for
Conductor or Katello. Looking forward to your feedback.
-- Jarda
--
Jaromír Coufal
Interaction Designer
Red Hat Czech s.r.o.
Mobile: +420 724 595 508
E-mail:jcoufal@redhat.com
IRC: jcoufal at #cloudforms-ui, #aeolus, #brno
11 years, 8 months