[PATCH conductor] Fixed cucumber tests

Jan Provazník jprovazn at redhat.com
Thu Sep 6 18:01:16 UTC 2012


On 09/06/2012 07:58 PM, jprovazn at redhat.com wrote:
> From: Jan Provaznik <jprovazn at 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
>

This is minor change, Self-ACK and pushed.



More information about the aeolus-devel mailing list