You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by "Koper, Dies" <di...@fast.au.fujitsu.com> on 2013/03/13 05:26:57 UTC

rake test:cimi and test:drivers:mock failing

After pulling the latest, rake test:cimi and test:drivers:mock are
failing for me now.
This is with a clean repo, no local changes.

Rake test:drivers:mock:
..[W] Wrong arguments for create_image. Omitting
credentials injection. (undefined class/module InstanceAddress)
...
  Unhandled exception or status code (undefined method `user' for
{:id=>"inst1", :name=>"img1-test-destroy"}:Hash)
  lib/deltacloud/drivers/mock/mock_driver.rb:568:in `block in
check_credentials'
  lib/deltacloud/drivers/exceptions.rb:220:in `call'
  lib/deltacloud/drivers/exceptions.rb:220:in `safely'
  lib/deltacloud/drivers/mock/mock_driver.rb:567:in `check_credentials'
  lib/deltacloud/drivers/mock/mock_driver.rb:143:in `create_image'
...

rake test:cimi:
ERROR
  undefined class/module InstanceProfile
  D:/Programs/Ruby193/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:312:in
`path2class'
...
D:/Programs/Ruby193/lib/ruby/gems/1.9.1/gems/rack-test-0.6.2/lib/rack/mo
ck_session.rb:30:in `request'
 
D:/Programs/Ruby193/lib/ruby/gems/1.9.1/gems/rack-test-0.6.2/lib/rack/te
st.rb:230:in `process_request'
 
D:/Programs/Ruby193/lib/ruby/gems/1.9.1/gems/rack-test-0.6.2/lib/rack/te
st.rb:57:in `get'
 tests/cimi/collections/machines_test.rb:42:in `machine'
 tests/cimi/collections/machines_test.rb:69:in `block (3 levels) in <top
(required)>'
 D:/Programs/Ruby193/bin/testrb:10:in `<main>'

[33mERROR
 undefined class/module InstanceAddress
...

Any idea why?

Regards,
Dies Koper


RE: rake test:cimi and test:drivers:mock failing

Posted by "Koper, Dies" <di...@fast.au.fujitsu.com>.
Hi Michal,

You are right, that was it. Thanks.

Regards,
Dies Koper


> -----Original Message-----
> From: Michal Fojtik [mailto:mfojtik@redhat.com]
> Sent: Wednesday, 13 March 2013 7:38 PM
> To: dev@deltacloud.apache.org
> Subject: Re: rake test:cimi and test:drivers:mock failing
> 
> On 03/13, Koper, Dies wrote:
> 
> I suspect this has to do something with the recent namespacing fixes
> I pushed for models.
> 
> Before we had 'InstanceAddress', now we have
> 'Deltacloud::InstanceAddress'.
> 
> This fix a bug when you mount DC into Rails application and you have
the
> 'InstanceAddress' model in the Rails app.
> 
> For this, I fixed the 'mock' fixtures (YAML files), to use:
> 
> !ruby/object:Deltacloud::InstanceAddress
> 
> instead of
> 
> !ruby/object:InstanceAddress
> 
> It is possible that you have still 'old' fixtures, so running 'rake
> mock:fixtures:reset' should help. If not, please ping me, i'll have a
> look,
> maybe I missed some YAML file.
> 
>   -- Michal
> 
> > After pulling the latest, rake test:cimi and test:drivers:mock are
> > failing for me now.
> > This is with a clean repo, no local changes.
> >
> > Rake test:drivers:mock:
> > ..[W] Wrong arguments for create_image. Omitting
> > credentials injection. (undefined class/module InstanceAddress)
> > ...
> >   Unhandled exception or status code (undefined method `user' for
> > {:id=>"inst1", :name=>"img1-test-destroy"}:Hash)
> >   lib/deltacloud/drivers/mock/mock_driver.rb:568:in `block in
> > check_credentials'
> >   lib/deltacloud/drivers/exceptions.rb:220:in `call'
> >   lib/deltacloud/drivers/exceptions.rb:220:in `safely'
> >   lib/deltacloud/drivers/mock/mock_driver.rb:567:in
> `check_credentials'
> >   lib/deltacloud/drivers/mock/mock_driver.rb:143:in `create_image'
> > ...
> >
> > rake test:cimi:
> > ERROR
> >   undefined class/module InstanceProfile
> >
> D:/Programs/Ruby193/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:312:in
> > `path2class'
> > ...
> >
> D:/Programs/Ruby193/lib/ruby/gems/1.9.1/gems/rack-test-0.6.2/lib/rac
> k/mo
> > ck_session.rb:30:in `request'
> >
> >
> D:/Programs/Ruby193/lib/ruby/gems/1.9.1/gems/rack-test-0.6.2/lib/rac
> k/te
> > st.rb:230:in `process_request'
> >
> >
> D:/Programs/Ruby193/lib/ruby/gems/1.9.1/gems/rack-test-0.6.2/lib/rac
> k/te
> > st.rb:57:in `get'
> >  tests/cimi/collections/machines_test.rb:42:in `machine'
> >  tests/cimi/collections/machines_test.rb:69:in `block (3 levels) in
> <top
> > (required)>'
> >  D:/Programs/Ruby193/bin/testrb:10:in `<main>'
> >
> > [33mERROR
> >  undefined class/module InstanceAddress
> > ...
> >
> > Any idea why?
> >
> > Regards,
> > Dies Koper
> >
> 
> --
> Michal Fojtik <mf...@redhat.com>
> Deltacloud API, CloudForms



Re: rake test:cimi and test:drivers:mock failing

Posted by Michal Fojtik <mf...@redhat.com>.
On 03/13, Koper, Dies wrote:

I suspect this has to do something with the recent namespacing fixes
I pushed for models.

Before we had 'InstanceAddress', now we have 'Deltacloud::InstanceAddress'.

This fix a bug when you mount DC into Rails application and you have the
'InstanceAddress' model in the Rails app.

For this, I fixed the 'mock' fixtures (YAML files), to use:

!ruby/object:Deltacloud::InstanceAddress

instead of

!ruby/object:InstanceAddress

It is possible that you have still 'old' fixtures, so running 'rake
mock:fixtures:reset' should help. If not, please ping me, i'll have a look,
maybe I missed some YAML file.

  -- Michal

> After pulling the latest, rake test:cimi and test:drivers:mock are
> failing for me now.
> This is with a clean repo, no local changes.
> 
> Rake test:drivers:mock:
> ..[W] Wrong arguments for create_image. Omitting
> credentials injection. (undefined class/module InstanceAddress)
> ...
>   Unhandled exception or status code (undefined method `user' for
> {:id=>"inst1", :name=>"img1-test-destroy"}:Hash)
>   lib/deltacloud/drivers/mock/mock_driver.rb:568:in `block in
> check_credentials'
>   lib/deltacloud/drivers/exceptions.rb:220:in `call'
>   lib/deltacloud/drivers/exceptions.rb:220:in `safely'
>   lib/deltacloud/drivers/mock/mock_driver.rb:567:in `check_credentials'
>   lib/deltacloud/drivers/mock/mock_driver.rb:143:in `create_image'
> ...
> 
> rake test:cimi:
> ERROR
>   undefined class/module InstanceProfile
>   D:/Programs/Ruby193/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:312:in
> `path2class'
> ...
> D:/Programs/Ruby193/lib/ruby/gems/1.9.1/gems/rack-test-0.6.2/lib/rack/mo
> ck_session.rb:30:in `request'
>  
> D:/Programs/Ruby193/lib/ruby/gems/1.9.1/gems/rack-test-0.6.2/lib/rack/te
> st.rb:230:in `process_request'
>  
> D:/Programs/Ruby193/lib/ruby/gems/1.9.1/gems/rack-test-0.6.2/lib/rack/te
> st.rb:57:in `get'
>  tests/cimi/collections/machines_test.rb:42:in `machine'
>  tests/cimi/collections/machines_test.rb:69:in `block (3 levels) in <top
> (required)>'
>  D:/Programs/Ruby193/bin/testrb:10:in `<main>'
> 
> [33mERROR
>  undefined class/module InstanceAddress
> ...
> 
> Any idea why?
> 
> Regards,
> Dies Koper
> 

-- 
Michal Fojtik <mf...@redhat.com>
Deltacloud API, CloudForms