[PATCH] BZ 852205 - clarify error message when user tries to delete a provider account with deployments with running instances
Tzu-Mainn Chen
tzumainn at redhat.com
Fri Sep 7 15:26:15 UTC 2012
I re-ran the spec tests with updated master; the only failures seem to be independent of this patch (they're happening without it), so I'm going to push this.
Mainn
----- Original Message -----
> From: "Francesco Vollero" <fvollero at redhat.com>
> To: tzumainn at redhat.com
> Cc: aeolus-devel at lists.fedorahosted.org
> Sent: Friday, September 7, 2012 10:35:33 AM
> Subject: Re: [PATCH] BZ 852205 - clarify error message when user tries to delete a provider account with deployments
> with running instances
>
> Review: Conditional ACK
>
> Cucumber tests:
> 203 scenarios (203 passed)
> 1951 steps (1951 passed)
> 3m26.321s
>
> Spec tests:
> http://fpaste.org/WLsA/
>
> From my point of view the patch is correct, but some spec are red so
> i raised the
> conditional thing.
>
> Cheers,
> Francesco
>
> On Fri, Sep 07, 2012 at 09:47:40AM -0400, tzumainn at redhat.com wrote:
> > From: Tzu-Mainn Chen <tzumainn at redhat.com>
> >
> > ---
> > src/app/models/provider_account.rb | 5 +++--
> > src/config/locales/en.yml | 2 +-
> > .../step_definitions/provider_account_steps.rb | 3 ++-
> > 3 files changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/src/app/models/provider_account.rb
> > b/src/app/models/provider_account.rb
> > index f23b286..acc7d64 100644
> > --- a/src/app/models/provider_account.rb
> > +++ b/src/app/models/provider_account.rb
> > @@ -149,8 +149,9 @@ class ProviderAccount < ActiveRecord::Base
> > true
> > else
> > raise Aeolus::Conductor::Base::NotDestroyable,
> > -
> > I18n.t('provider_accounts.errors.not_destroyable_instances',
> > - :instances => not_destroyable_instances.map{|i|
> > i.name}.join(', '))
> > +
> > I18n.t('provider_accounts.errors.not_destroyable_deployments',
> > + :deployments => not_destroyable_instances.
> > + map{|i| i.deployment.name}.uniq.join(', '))
> > end
> > end
> >
> > diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
> > index 250307d..092d5f7 100644
> > --- a/src/config/locales/en.yml
> > +++ b/src/config/locales/en.yml
> > @@ -1339,7 +1339,7 @@ en:
> > populate_hardware_profiles_failed: "Failed to populate
> > hardware_profiles: %{message}"
> > populate_realms_failed: "Failed to populate Realms:
> > %{message}"
> > could_not_connect: "Could not connect to Provider Account.
> > Please contact an Administrator."
> > - not_destroyable_instances: "Can not destroy following
> > instances: %{instances}"
> > + not_destroyable_deployments: "The following Deployments have
> > not been stopped: %{deployments}"
> > associated_images: "There are following associated provider
> > images: %{images}. Delete them first."
> > provider_priority_groups:
> > index:
> > diff --git
> > a/src/features/step_definitions/provider_account_steps.rb
> > b/src/features/step_definitions/provider_account_steps.rb
> > index 74ac178..135a4bf 100644
> > --- a/src/features/step_definitions/provider_account_steps.rb
> > +++ b/src/features/step_definitions/provider_account_steps.rb
> > @@ -14,7 +14,8 @@
> > # limitations under the License.
> > #
> > Given /^the account has an instance associated with it$/ do
> > - FactoryGirl.create :instance, :provider_account =>
> > @provider_account
> > + deployment = Factory.create(:deployment)
> > + FactoryGirl.create :instance, :provider_account =>
> > @provider_account, :deployment => deployment
> > end
> >
> > Given /^all the account instances are stopped$/ do
> > --
> > 1.7.6.5
> >
>
More information about the aeolus-devel
mailing list