You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by rl...@redhat.com on 2012/12/03 17:02:25 UTC

CIMI - tests adding test ordering and rake task cimi:testplan

Please review ...

Thanks!

[PATCH] CIMI - tests adding test ordering and task:cimiplan

Posted by rl...@redhat.com.
From: Ronelle Landy <rl...@redhat.com>

---
 tests/Rakefile           |    4 ++++
 tests/cimi/cep_test.rb   |    3 +++
 tests/cimi/part2_test.rb |    3 +++
 tests/cimi/part3_test.rb |    3 +++
 tests/cimi/part4_test.rb |    3 +++
 tests/cimi/part5_test.rb |    3 +++
 6 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/tests/Rakefile b/tests/Rakefile
index f276dbb..b196aed 100644
--- a/tests/Rakefile
+++ b/tests/Rakefile
@@ -34,4 +34,8 @@ namespace :test do
     t.test_files = FileList["cimi/*_test.rb"]
   end
 
+  Rake::TestTask.new(:cimiplan) do |t|
+    t.test_files = FileList["cimi/part*_test.rb", "cimi/cep_test.rb"]
+  end
+
 end
diff --git a/tests/cimi/cep_test.rb b/tests/cimi/cep_test.rb
index 3c8149d..7504667 100644
--- a/tests/cimi/cep_test.rb
+++ b/tests/cimi/cep_test.rb
@@ -35,6 +35,9 @@ class CloundEntryPointBehavior < CIMI::Test::Spec
 
   RESOURCE_URI = "http://schemas.dmtf.org/cimi/1/CloudEntryPoint"
 
+  #  Ensure test executes in test plan order
+  i_suck_and_my_tests_are_order_dependent!
+
   # We'd like to call this :cep, but there's already a method by that name
   model :subject, :cache => true do |fmt|
     cep(:accept => fmt)
diff --git a/tests/cimi/part2_test.rb b/tests/cimi/part2_test.rb
index ae26710..c273614 100644
--- a/tests/cimi/part2_test.rb
+++ b/tests/cimi/part2_test.rb
@@ -25,6 +25,9 @@ class CreateNewMachine < CIMI::Test::Spec
 
   MiniTest::Unit.after_tests { teardown(@@created_resources, api.basic_auth) }
 
+  #  Ensure test executes in test plan order
+  i_suck_and_my_tests_are_order_dependent!
+
   # 2.1: Query the CEP
   model :subject, :cache => true do |fmt|
     cep(:accept => fmt)
diff --git a/tests/cimi/part3_test.rb b/tests/cimi/part3_test.rb
index 4b70efe..8915727 100644
--- a/tests/cimi/part3_test.rb
+++ b/tests/cimi/part3_test.rb
@@ -23,6 +23,9 @@ class CreateNewMachineFromMachineTemplate < CIMI::Test::Spec
     "http://schemas.dmtf.org/cimi/1/CloudEntryPoint"
   ROOTS = ["machines", "machineImages", "machineConfigurations"]
 
+  #  Ensure test executes in test plan order
+  i_suck_and_my_tests_are_order_dependent!
+
   model :subject, :cache => true do |fmt|
     cep(:accept => fmt)
   end
diff --git a/tests/cimi/part4_test.rb b/tests/cimi/part4_test.rb
index 056aeff..f065104 100644
--- a/tests/cimi/part4_test.rb
+++ b/tests/cimi/part4_test.rb
@@ -26,6 +26,9 @@ class AddVolumeToMachine < CIMI::Test::Spec
   # Cleanup for resources created for the test
   MiniTest::Unit.after_tests {  teardown(@@created_resources, api.basic_auth) }
 
+  #  Ensure test executes in test plan order
+  i_suck_and_my_tests_are_order_dependent!
+
   # 4.1: Query the CEP
   model :subject, :cache => true do |fmt|
     cep(:accept => fmt)
diff --git a/tests/cimi/part5_test.rb b/tests/cimi/part5_test.rb
index d451a7b..f1ce6c9 100644
--- a/tests/cimi/part5_test.rb
+++ b/tests/cimi/part5_test.rb
@@ -26,6 +26,9 @@ class ManipulateAMachine < CIMI::Test::Spec
 
   MiniTest::Unit.after_tests {  teardown(@@created_resources, api.basic_auth) }
 
+  #  Ensure test executes in test plan order
+  i_suck_and_my_tests_are_order_dependent!
+
   # 2.1: Query the Machine
   # For some providers - need to create a machine before querying it.
   cep_json = cep(:accept => :json)
-- 
1.7.7.6


Re: CIMI - tests adding test ordering and rake task cimi:testplan

Posted by Michal Fojtik <mf...@redhat.com>.
ACK && pushed! thanks!

----- Original Message -----
From: rlandy@redhat.com
To: dev@deltacloud.apache.org
Sent: Monday, December 3, 2012 5:02:25 PM
Subject: CIMI - tests adding test ordering and rake task cimi:testplan


Please review ...

Thanks!