deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Lutterkort <lut...@redhat.com>
Subject Re: [PATCH core 17/26] Core: Replaced Test/Unit based tests for Mock with new minitest
Date Thu, 17 May 2012 21:32:10 GMT
On Tue, 2012-05-15 at 17:15 +0200, mfojtik@redhat.com wrote:
> From: Michal Fojtik <mfojtik@redhat.com>
> 
> 
> Signed-off-by: Michal fojtik <mfojtik@redhat.com>

Running 'test:rackspace' fails for me right now, because there is no
tests/drivers/rackspace/common.rb - did you forget to check that in ?

> diff --git a/server/Rakefile b/server/Rakefile
> index 5d205ce..50971f5 100644
> --- a/server/Rakefile
> +++ b/server/Rakefile
> @@ -244,3 +224,25 @@ namespace :rabbit do
>  
>  end
>  
> +namespace :test do
> +
> +  %w(mock rackspace rhevm openstack google fgcp).each do |driver|
> +    desc "Run #{driver} unit tests"
> +    Rake::TestTask.new(driver) { |t|
> +      Rake::Task["mock:fixtures:reset"].invoke
> +      t.test_files = ['tests/drivers/'+driver+'/common.rb'] + FileList.new("tests/drivers/#{driver}/*_test.rb")

I generally like when you can run tests without rake, e.g. run 'ruby
tests/drivers/mock/api_test.rb' Relying on the Rakefile to preload
certain files makes that impossible. It would be better to structure
tests so that they all have a "require_relative 'common'" which in turn
requires tests/common.

Also, I am curious about setup.rb: shouldn't that go into some sort of
hook that is run at certain points in the test cycle (before any tests
are run or before each suite etc.)

> +      t.options = "-v -v"

Can we get rid of that ? It leads to a ton of spam on the console.

David



Mime
View raw message