jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aleksandra Nowak <aleksandra.no...@man.poznan.pl>
Subject how to test swift api in transient mode
Date Fri, 25 Nov 2016 15:32:57 GMT
Hi,
I'm trying to migrate my code to use jclouds 2.0.0. I changed from swift 
dependency to openstack-swift, so I use SwiftApi object to access Swift 
(instead of BlobStore which I used before). The code seems to look fine 
when I run it on a live cluster.

But I had unit tests that were using transient mode/container and now I 
cannot make them work.

I got:

com.google.inject.ConfigurationException: Guice configuration errors:

1) No implementation for org.jclouds.openstack.swift.v1.SwiftApi was bound.
   while locating org.jclouds.openstack.swift.v1.SwiftApi

Is transient mode still valid in 2.0? It is listed as possible 
"providerOrApi" in 
org.jclouds.ContextBuilder#newBuilder(java.lang.String). How to use it? 
There is no information about it on documentation pages, wheras it still 
claims that " Write your unit tests without mocking complexity or the 
brittleness of remote connections. Writing tests for cloud endpoints is 
difficult. jclouds provides you with Stub connections that simulate a 
cloud without creating network connections." (from 
http://jclouds.apache.org/start/what-is-jclouds/)

Thank you in advance,
Aleksandra


Mime
View raw message