simpledb back to work

This commit is contained in:
Adrian Cole 2011-04-29 15:03:19 -07:00
parent b6bbb9c1c6
commit 9388f8b5ca
3 changed files with 14 additions and 45 deletions

View File

@ -1,40 +0,0 @@
/**
*
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
*
* ====================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*/
package org.jclouds.simpledb;
import org.jclouds.rest.Providers;
import org.testng.annotations.Test;
import com.google.common.collect.Iterables;
/**
*
* @author Adrian Cole
*
*/
@Test(groups = "unit")
public class ProvidersInPropertiesTest {
@Test
public void testSupportedProviders() {
Iterable<String> providers = Providers.getSupportedProviders();
assert Iterables.contains(providers, "simpledb") : providers;
}
}

View File

@ -134,7 +134,11 @@ public class SimpleDBAsyncClientTest extends RestClientTest<SimpleDBAsyncClient>
@Override
public RestContextSpec<?, ?> createContextSpec() {
return new RestContextFactory().createContextSpec(provider, "identity", "credential", new Properties());
// TODO take this out, when the service is registered in jclouds-core/rest.properties
Properties restProperties = new Properties();
restProperties.setProperty(provider + ".contextbuilder", SimpleDBContextBuilder.class.getName());
restProperties.setProperty(provider + ".propertiesbuilder", SimpleDBPropertiesBuilder.class.getName());
return new RestContextFactory(restProperties).createContextSpec(provider, "foo", "bar", getProperties());
}
}

View File

@ -24,6 +24,7 @@ import java.util.Properties;
import org.jclouds.aws.domain.Region;
import org.jclouds.rest.RestContextFactory;
import org.jclouds.rest.RestContextSpec;
import org.jclouds.simpledb.SimpleDBAsyncClient;
import org.jclouds.simpledb.SimpleDBAsyncClientTest;
import org.testng.annotations.Test;
@ -53,4 +54,8 @@ public class AWSSimpleDBAsyncClientTest extends SimpleDBAsyncClientTest {
}
}
@Override
public RestContextSpec<?, ?> createContextSpec() {
return new RestContextFactory().createContextSpec(provider, "foo", "bar", getProperties());
}
}