deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Fojtik <mfoj...@redhat.com>
Subject Re: [PATCH core 17/26] Core: Replaced Test/Unit based tests for Mock with new minitest
Date Fri, 18 May 2012 11:35:40 GMT
On 05/17/12, David Lutterkort wrote:
> 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 ?

Yes, it's now on place, howerver there are some buckets related failures,
which I think are just expired fixtures that we need to re-record.

I also reworked all tests in the way where you should be able to use the
Ruby interpreter to run each test separately (ruby
tests/drivers/mock/api_test.rb, etc...)

So now **all** 'rake test:*' should be fixed/converted to work with the
Sinatra::Base version.

For example the openstack tests should run without a single failure.
There are some failures for the rackspace driver and for the rhevm
driver, but those are just expired fixtures. I'm going to re-record
them today/tomorrow.

After that we should have *all* tests fixed and ready for the QA to pick
them up.

  -- Michal

> 
> > 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
> 
> 

-- 
Michal Fojtik
Sr. Software Engineer, Deltacloud API (http://deltacloud.org)

Mime
View raw message