[ 
https://issues.apache.org/jira/browse/DTACLOUD-540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13627690#comment-13627690
 ] 

Michal Fojtik commented on DTACLOUD-540:
----------------------------------------

Problem identified:

As we switched to use initializer, in order to load the Mock driver properly 
you need to use:

require "initializers/mock_initialize"

which I found **extremely** ugly. For that I created a patch which allows to 
pass ':mock_initialize => true' option to #require! method.

Pull request: https://github.com/deltacloud/core/pull/5

                
> Unable to mount Deltacloud::API using Rack::MockSession 
> --------------------------------------------------------
>
>                 Key: DTACLOUD-540
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-540
>             Project: DeltaCloud
>          Issue Type: Bug
>            Reporter: Michal Fojtik
>            Assignee: Michal Fojtik
>            Priority: Blocker
>
> The current (1.1.2) DC cannot be used for 'MockSession' [1] approach.
> If you use 1.1.2 gem, the following error is raised:
> $ rake console
> undefined method `has_feature?' for NilClass:Class
> /home/mfojtik/code/deltacloud-client/lib/deltacloud/server.rb:26:in 
> `initialize'
> /home/mfojtik/code/deltacloud-client/lib/deltacloud/client/connection.rb:93:in
>  `cache_entrypoint!'
> /home/mfojtik/code/deltacloud-client/lib/deltacloud/client/connection.rb:41:in
>  `initialize'
> /home/mfojtik/code/deltacloud-client/lib/deltacloud/client.rb:95:in `new'
> /home/mfojtik/code/deltacloud-client/lib/deltacloud/client.rb:95:in `Client'
> /home/mfojtik/code/deltacloud-client/lib/deltacloud/client.rb:68:in `Connect'
> /home/mfojtik/code/deltacloud-client/Rakefile:71:in `block in <top 
> (required)>'
> This error was originally reported by mpovolny. Thanks!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to