From: Tomas Sedovic <[email protected]>

NOTE about running Cucumber tests with Solr:

The tests require that the Solr server be running. This is analogous to having
the Deltacloud API server up. You start it thusly:

    $ rake sunspot:solr:start RAILS_ENV=cucumber

And then run the tests as usual:

    $ rake cucumber
---
 src/features/hardware_profile.feature |   30 +++++++++++++++++++++++++++++-
 1 files changed, 29 insertions(+), 1 deletions(-)

diff --git a/src/features/hardware_profile.feature 
b/src/features/hardware_profile.feature
index 6f1cc81..5f63c96 100644
--- a/src/features/hardware_profile.feature
+++ b/src/features/hardware_profile.feature
@@ -48,4 +48,32 @@ Feature: Manage Pools
     And I follow "Matching Provider Hardware Profiles"
     Then I should see the following:
     | Name      | Memory | CPU | Storage  | Architecture |
-    | m1-small  | 1740   | 2   | 160      | i386         |
\ No newline at end of file
+    | m1-small  | 1740   | 2   | 160      | i386         |
+
+  Scenario: Search for hardware profiles
+    Given there are the following aggregator hardware profiles:
+    | name      | memory | cpu |storage  | architecture |
+    | m1-small  | 1740   | 2   | 160     | i386         |
+    | m1-large  | 4096   | 4   | 850     | x86_64       |
+    | m1-xlarge | 8192   | 8   | 1690    | x86_64       |
+    And I am on the the hardware profiles page
+    When I fill in "q" with "large"
+    And I press "Search"
+    Then I should see "m1-large"
+    And I should see "m1-xlarge"
+    And I should not see "m1-small"
+    When I fill in "q" with "small"
+    And I press "Search"
+    Then I should see "m1-small"
+    And I should not see "m1-large"
+    And I should not see "m1-xlarge"
+    When I fill in "q" with ""
+    And I press "Search"
+    Then I should see "m1-small"
+    And I should see "m1-large"
+    And I should see "m1-xlarge"
+    When I fill in "q" with "i386"
+    And I press "Search"
+    Then I should see "m1-small"
+    And I should not see "m1-large"
+    And I should not see "m1-xlarge"
-- 
1.7.3.4

_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to