mirror of https://github.com/apache/jclouds.git
- Brings JClouds Chef up to speed with latest JClouds 1.0-SNAPSHOT (approximately 1.0-beta-9b)
- Unit tests all pass - Some broken live tests, will fix soon
This commit is contained in:
parent
79ac66fbd4
commit
cdd1636514
|
@ -25,13 +25,12 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-chef-project</artifactId>
|
||||
<artifactId>jclouds-chef-pom</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
<relativePath>../project/pom.xml</relativePath>
|
||||
</parent>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-chef</artifactId>
|
||||
<name>jclouds Chef core</name>
|
||||
<name>JClouds Chef :: Core</name>
|
||||
<description>jclouds components to access Chef</description>
|
||||
|
||||
<properties>
|
||||
|
@ -45,120 +44,57 @@
|
|||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-core</artifactId>
|
||||
<version>${jclouds.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-core</artifactId>
|
||||
<version>${jclouds.version}</version>
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-scriptbuilder</artifactId>
|
||||
<version>${jclouds.version}</version>
|
||||
</dependency>
|
||||
<!-- for transient chef provider -->
|
||||
<dependency>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-blobstore</artifactId>
|
||||
<version>${jclouds.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-compute</artifactId>
|
||||
<version>${jclouds.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.driver</groupId>
|
||||
<artifactId>jclouds-log4j</artifactId>
|
||||
<version>${jclouds.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- only required for Pems.java and only writing a private key file -->
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk15</artifactId>
|
||||
<version>1.44</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>jclouds-scriptbuilder</artifactId>
|
||||
<version>${jclouds.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>jclouds-core</artifactId>
|
||||
<version>${jclouds.version}</version>
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.14</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.driver</groupId>
|
||||
<artifactId>jclouds-log4j</artifactId>
|
||||
<version>${jclouds.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.danlarkin</groupId>
|
||||
<artifactId>clojure-json</artifactId>
|
||||
<version>1.1</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<!-- for transient chef provider -->
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>jclouds-blobstore</artifactId>
|
||||
<version>${jclouds.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<!--TODO: This is borrowed from another module, the chef properties need to be filled in for the tests to work-->
|
||||
<!--
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>live</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>integration</id>
|
||||
<phase>integration-test</phase>
|
||||
<goals>
|
||||
<goal>test</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>none</exclude>
|
||||
</excludes>
|
||||
<includes>
|
||||
<include>**/*LiveTest.java</include>
|
||||
</includes>
|
||||
<systemProperties>
|
||||
<property>
|
||||
<name>jclouds.compute.provider</name>
|
||||
<value>${jclouds.compute.provider}</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>jclouds.compute.endpoint</name>
|
||||
<value>${jclouds.compute.endpoint}</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>jclouds.compute.identity</name>
|
||||
<value>${jclouds.compute.identity}</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>jclouds.compute.credential</name>
|
||||
<value>${jclouds.compute.credential}</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>jclouds.compute.tag</name>
|
||||
<value>${jclouds.compute.tag}</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>jclouds.compute.credential</name>
|
||||
<value>${jclouds.compute.credential}</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>jclouds.chef.credential.pem</name>
|
||||
<value>${jclouds.chef.credential.pem}</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>jclouds.chef.endpoint</name>
|
||||
<value>${jclouds.chef.endpoint}</value>
|
||||
</property>
|
||||
</systemProperties>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
-->
|
||||
|
||||
</project>
|
||||
|
|
|
@ -92,7 +92,7 @@ public class BaseChefRestClientModule<S, A> extends RestClientModule<S, A> {
|
|||
@Singleton
|
||||
public PrivateKey provideKey(Crypto crypto, @Named(PROPERTY_CREDENTIAL) String pem) throws InvalidKeySpecException,
|
||||
IOException {
|
||||
return crypto.rsaKeyFactory().generatePrivate(Pems.privateKeySpec(InputSuppliers.of(pem)));
|
||||
return crypto.rsaKeyFactory().generatePrivate(Pems.privateKeySpec(InputSuppliers.of(pem)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -19,24 +19,22 @@
|
|||
|
||||
package org.jclouds.ohai;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.jclouds.ohai.config.ConfiguresOhai;
|
||||
import org.jclouds.ohai.config.JMXOhaiModule;
|
||||
import org.jclouds.rest.RestContext;
|
||||
import org.jclouds.rest.RestContextBuilder;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.inject.Module;
|
||||
import org.jclouds.compute.ComputeServiceContextBuilder;
|
||||
import org.jclouds.ohai.config.ConfiguresOhai;
|
||||
import org.jclouds.ohai.config.JMXOhaiModule;
|
||||
import org.jclouds.rest.RestContext;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
*
|
||||
* @see RestContext
|
||||
*/
|
||||
public class OhaiContextBuilder<S, A> extends RestContextBuilder<S, A> {
|
||||
public class OhaiContextBuilder<S, A> extends ComputeServiceContextBuilder<S, A> {
|
||||
|
||||
@Inject
|
||||
public OhaiContextBuilder(Class<S> syncClientClass, Class<A> asyncClientClass, Properties properties) {
|
||||
|
|
|
@ -60,7 +60,7 @@ import com.google.common.primitives.Bytes;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "chef.ChefClientLiveTest")
|
||||
@Test(groups = { "live" })
|
||||
public abstract class BaseChefClientLiveTest {
|
||||
|
||||
protected String clientKey;
|
||||
|
|
|
@ -69,7 +69,7 @@ import com.google.inject.TypeLiteral;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", testName = "chef.ChefAsyncClientTest")
|
||||
@Test(groups = { "unit" })
|
||||
public class ChefAsyncClientTest extends RestClientTest<ChefAsyncClient> {
|
||||
|
||||
public void testCommitSandbox() throws SecurityException, NoSuchMethodException, IOException {
|
||||
|
|
|
@ -46,7 +46,7 @@ import com.google.inject.Module;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "chef.ChefClientLiveTest")
|
||||
@Test(groups = { "live" })
|
||||
public class ChefClientLiveTest extends BaseChefClientLiveTest {
|
||||
|
||||
private ChefContext validatorConnection;
|
||||
|
|
|
@ -19,22 +19,21 @@
|
|||
|
||||
package org.jclouds.chef;
|
||||
|
||||
import org.jclouds.util.Utils;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.common.collect.Iterables;
|
||||
import org.jclouds.compute.util.ComputeServiceUtils;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*
|
||||
*/
|
||||
@Test(groups = "unit")
|
||||
@Test(groups = { "unit" })
|
||||
public class ProvidersInPropertiesTest {
|
||||
|
||||
@Test
|
||||
public void testSupportedProviders() {
|
||||
Iterable<String> providers = Utils.getSupportedProviders();
|
||||
Iterable<String> providers = ComputeServiceUtils.getSupportedProviders();
|
||||
assert Iterables.contains(providers, "chef") : providers;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ import com.google.inject.Injector;
|
|||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", testName = "chef.BootstrapChefClientTest")
|
||||
@Test(groups = { "unit" })
|
||||
public class BindHexEncodedMD5sToJsonPayloadTest {
|
||||
|
||||
Injector injector = Guice.createInjector(new ChefParserModule(), new GsonModule());
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
package org.jclouds.chef.filters;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertEqualsNoOrder;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
|
@ -54,7 +55,7 @@ import com.google.inject.Module;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", testName = "chef.SignedHeaderAuthTest")
|
||||
@Test(groups = { "unit" })
|
||||
public class SignedHeaderAuthTest {
|
||||
|
||||
public static final String USER_ID = "spec-user";
|
||||
|
@ -77,7 +78,8 @@ public class SignedHeaderAuthTest {
|
|||
"NMzYZgyooSvU85qkIUmKuCqgG2AIlvYa2Q/2ctrMhoaHhLOCWWoqYNMaEqPc",
|
||||
"3tKHE+CfvP+WuPdWk4jv4wpIkAz6ZLxToxcGhXmZbXpk56YTmqgBW2cbbw4O",
|
||||
"IWPZDHSiPcw//AYNgW1CCDptt+UFuaFYbtqZegcBd2n/jzcWODA7zL4KWEUy",
|
||||
"9q4rlh/+1tBReg60QdsmDRsw/cdO1GZrKtuCwbuD4+nbRdVBKv72rqHX9cu0", "utju9jzczCyB+sSAQWrxSsXB/b8vV2qs0l4VD2ML+w==" };
|
||||
"9q4rlh/+1tBReg60QdsmDRsw/cdO1GZrKtuCwbuD4+nbRdVBKv72rqHX9cu0",
|
||||
"utju9jzczCyB+sSAQWrxSsXB/b8vV2qs0l4VD2ML+w==" };
|
||||
|
||||
// We expect Mixlib::Authentication::SignedHeaderAuth//sign to return this
|
||||
// if passed the BODY above.
|
||||
|
@ -142,8 +144,8 @@ public class SignedHeaderAuthTest {
|
|||
|
||||
request = signing_obj.filter(request);
|
||||
Multimap<String, String> headersWithoutContentLength = LinkedHashMultimap.create(request.getHeaders());
|
||||
headersWithoutContentLength.removeAll(HttpHeaders.CONTENT_LENGTH);
|
||||
assertEquals(headersWithoutContentLength.values(), EXPECTED_SIGN_RESULT.values());
|
||||
headersWithoutContentLength.removeAll( HttpHeaders.CONTENT_LENGTH );
|
||||
assertEqualsNoOrder( headersWithoutContentLength.values().toArray(), EXPECTED_SIGN_RESULT.values().toArray() );
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -154,7 +156,7 @@ public class SignedHeaderAuthTest {
|
|||
|
||||
request = signing_obj.filter(request);
|
||||
Multimap<String, String> headersWithoutContentLength = LinkedHashMultimap.create(request.getHeaders());
|
||||
assertEquals(headersWithoutContentLength.entries(), EXPECTED_SIGN_RESULT_EMPTY.entries());
|
||||
assertEqualsNoOrder(headersWithoutContentLength.entries().toArray(), EXPECTED_SIGN_RESULT_EMPTY.entries().toArray());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -37,7 +37,7 @@ import com.google.common.collect.ImmutableSet;
|
|||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", testName = "chef.ClientForTagTest")
|
||||
@Test(groups = { "unit" })
|
||||
public class ClientForTagTest {
|
||||
|
||||
public void testWhenNoClientsInList() throws IOException {
|
||||
|
|
|
@ -52,7 +52,7 @@ import com.google.inject.TypeLiteral;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", sequential = true, testName = "chef.ParseClientFromJsonTest")
|
||||
@Test(groups = { "unit" }, sequential = true)
|
||||
public class ParseClientFromJsonTest {
|
||||
|
||||
private static final String PRIVATE_KEY = "-----BEGIN RSA PRIVATE KEY-----\nMIIEpQIBAAKCAQEAyb2ZJJqGm0KKR+8nfQJNsSd+F9tXNMV7CfOcW6jsqs8EZgiV\nR09hD1IYOj4YqM0qJONlgyg4xRWewdSG7QTPj1lJpVAida9sXy2+kzyagZA1Am0O\nZcbqb5hoeIDgcX+eDa79s0u0DomjcfO9EKhvHLBz+zM+3QqPRkPV8nYTbfs+HjVz\nzOU6D1B0XR3+IPZZl2AnWs2d0qhnStHcDUvnRVQ0P482YwN9VgceOZtpPz0DCKEJ\n5Tx5STub8k0/zt/VAMHQafLSuQMLd2s4ZLuOZptN//uAsTmxireqd37z+8ZTdBbJ\n8LEpJ+iCXuSfm5aUh7iw6oxvToY2AL53+jK2UQIDAQABAoIBAQDA88B3i/xWn0vX\nBVxFamCYoecuNjGwXXkSyZew616A+EOCu47bh4aTurdFbYL0YFaAtaWvzlaN2eHg\nDb+HDuTefE29+WkcGk6SshPmiz5T0XOCAICWw6wSVDkHmGwS4jZvbAFm7W8nwGk9\nYhxgxFiRngswJZFopOLoF5WXs2td8guIYNslMpo7tu50iFnBHwKO2ZsPAk8t9nnS\nxlDavKruymEmqHCr3+dtio5eaenJcp3fjoXBQOKUk3ipII29XRB8NqeCVV/7Kxwq\nckqOBEbRwBclckyIbD+RiAgKvOelORjEiE9R42vuqvxRA6k9kd9o7utlX0AUtpEn\n3gZc6LepAoGBAP9ael5Y75+sK2JJUNOOhO8ae45cdsilp2yI0X+UBaSuQs2+dyPp\nkpEHAxd4pmmSvn/8c9TlEZhr+qYbABXVPlDncxpIuw2Ajbk7s/S4XaSKsRqpXL57\nzj/QOqLkRk8+OVV9q6lMeQNqLtEj1u6JPviX70Ro+FQtRttNOYbfdP/fAoGBAMpA\nXjR5woV5sUb+REg9vEuYo8RSyOarxqKFCIXVUNsLOx+22+AK4+CQpbueWN7jotrl\nYD6uT6svWi3AAC7kiY0UI/fjVPRCUi8tVoQUE0TaU5VLITaYOB+W/bBaDE4M9560\n1NuDWO90baA5dfU44iuzva02rGJXK9+nS3o8nk/PAoGBALOL6djnDe4mwAaG6Jco\ncd4xr8jkyPzCRZuyBCSBbwphIUXLc7hDprPky064ncJD1UDmwIdkXd/fpMkg2QmA\n/CUk6LEFjMisqHojOaCL9gQZJPhLN5QUN2x1PJWGjs1vQh8Tkx0iUUCOa8bQPXNR\n+34OTsW6TUna4CSZAycLfhffAoGBAIggVsefBCvuQkF0NeUhmDCRZfhnd8y55RHR\n1HCvqKIlpv+rhcX/zmyBLuteopYyRJRsOiE2FW00i8+rIPRu4Z3Q5nybx7w3PzV9\noHN5R5baE9OyI4KpZWztpYYitZF67NcnAvVULHHOvVJQGnKYfLHJYmrJF7GA1ojM\nAuMdFbjFAoGAPxUhxwFy8gaqBahKUEZn4F81HFP5ihGhkT4QL6AFPO2e+JhIGjuR\n27+85hcFqQ+HHVtFsm81b/a+R7P4UuCRgc8eCjxQMoJ1Xl4n7VbjPbHMnIN0Ryvd\nO4ZpWDWYnCO021JTOUUOJ4J/y0416Bvkw0z59y7sNX7wDBBHHbK/XCc=\n-----END RSA PRIVATE KEY-----\n";
|
||||
|
|
|
@ -52,7 +52,7 @@ import com.google.inject.TypeLiteral;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", sequential = true, testName = "chef.ParseCookbookVersionFromJsonTest")
|
||||
@Test(groups = { "unit" }, sequential = true)
|
||||
public class ParseCookbookVersionFromJsonTest {
|
||||
|
||||
private ParseJson<CookbookVersion> handler;
|
||||
|
|
|
@ -41,7 +41,7 @@ import com.google.inject.TypeLiteral;
|
|||
/**
|
||||
* @author AdrianCole
|
||||
*/
|
||||
@Test(groups = "unit", testName = "chef.ParseDataBagItemFromJsonTest")
|
||||
@Test(groups = { "unit" })
|
||||
public class ParseDataBagItemFromJsonTest {
|
||||
private ParseJson<DatabagItem> handler;
|
||||
private Json mapper;
|
||||
|
|
|
@ -33,7 +33,7 @@ import org.testng.annotations.Test;
|
|||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", testName = "chef.ParseErrorFromJsonOrReturnBodyTest")
|
||||
@Test(groups = { "unit" })
|
||||
public class ParseErrorFromJsonOrReturnBodyTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -39,7 +39,7 @@ import com.google.inject.Injector;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", sequential = true, testName = "chef.ParseKeySetFromJsonTest")
|
||||
@Test(groups = { "unit" }, sequential = true)
|
||||
public class ParseKeySetFromJsonTest {
|
||||
|
||||
private ParseKeySetFromJson handler;
|
||||
|
|
|
@ -45,7 +45,7 @@ import com.google.inject.TypeLiteral;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", sequential = true, testName = "chef.ParseNodeFromJsonTest")
|
||||
@Test(groups = { "unit" }, sequential = true)
|
||||
public class ParseNodeFromJsonTest {
|
||||
|
||||
private ParseJson<Node> handler;
|
||||
|
|
|
@ -44,7 +44,7 @@ import com.google.inject.TypeLiteral;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", sequential = true, testName = "chef.ParseSandboxFromJsonTest")
|
||||
@Test(groups = { "unit" }, sequential = true)
|
||||
public class ParseSandboxFromJsonTest {
|
||||
|
||||
private ParseJson<Sandbox> handler;
|
||||
|
|
|
@ -48,7 +48,7 @@ import com.google.inject.TypeLiteral;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", sequential = true, testName = "chef.ParseUploadSiteFromJsonTest")
|
||||
@Test(groups = { "unit" }, sequential = true)
|
||||
public class ParseUploadSandboxFromJsonTest {
|
||||
|
||||
private ParseJson<UploadSandbox> handler;
|
||||
|
|
|
@ -42,7 +42,7 @@ import com.google.inject.Injector;
|
|||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", testName = "chef.RunListForTagTest")
|
||||
@Test(groups = { "unit" })
|
||||
public class RunListForTagTest {
|
||||
Injector injector = Guice.createInjector(new ChefParserModule(), new GsonModule());
|
||||
Json json = injector.getInstance(Json.class);
|
||||
|
|
|
@ -50,7 +50,7 @@ import com.google.inject.Injector;
|
|||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", testName = "chef.TagToBootScriptTest")
|
||||
@Test(groups = { "unit" })
|
||||
public class TagToBootScriptTest {
|
||||
|
||||
Injector injector = Guice.createInjector(new ChefParserModule(), new GsonModule());
|
||||
|
|
|
@ -38,7 +38,7 @@ import org.testng.annotations.Test;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", testName = "chef.ChefClientErrorRetryHandlerTest")
|
||||
@Test(groups = { "unit" })
|
||||
public class ChefClientErrorRetryHandlerTest {
|
||||
@Test
|
||||
public void test401DoesNotRetry() {
|
||||
|
|
|
@ -46,7 +46,7 @@ import com.google.inject.Module;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "chef.BaseChefStrategyLiveTest")
|
||||
@Test(groups = { "live" })
|
||||
public abstract class BaseChefStrategyLiveTest {
|
||||
|
||||
protected Injector injector;
|
||||
|
|
|
@ -30,13 +30,13 @@ import com.google.common.collect.ImmutableSet;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "chef.CleanupStaleNodesAndClientsImplLiveTest")
|
||||
@Test(groups = { "live" })
|
||||
public class CleanupStaleNodesAndClientsImplLiveTest extends BaseChefStrategyLiveTest {
|
||||
private CreateNodeAndPopulateAutomaticAttributesImpl creater;
|
||||
private CleanupStaleNodesAndClientsImpl strategy;
|
||||
private ChefClient chef;
|
||||
|
||||
@BeforeTest(groups = "live", dependsOnMethods = "setupClient")
|
||||
@BeforeTest(groups = { "live" }, dependsOnMethods = "setupClient")
|
||||
void setupStrategy() {
|
||||
this.creater = injector.getInstance(CreateNodeAndPopulateAutomaticAttributesImpl.class);
|
||||
this.strategy = injector.getInstance(CleanupStaleNodesAndClientsImpl.class);
|
||||
|
|
|
@ -45,7 +45,7 @@ import com.google.inject.Module;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "chef.CreateNodeAndPopulateAutomaticAttributesImplLiveTest")
|
||||
@Test(groups = { "live" })
|
||||
public class CreateNodeAndPopulateAutomaticAttributesImplLiveTest extends BaseChefStrategyLiveTest {
|
||||
|
||||
private CreateNodeAndPopulateAutomaticAttributesImpl strategy;
|
||||
|
@ -64,7 +64,7 @@ public class CreateNodeAndPopulateAutomaticAttributesImplLiveTest extends BaseCh
|
|||
modules.add(new TestOhaiModule());
|
||||
}
|
||||
|
||||
@BeforeTest(groups = "live", dependsOnMethods = "setupClient")
|
||||
@BeforeTest(groups = { "live" }, dependsOnMethods = "setupClient")
|
||||
void setupStrategy() {
|
||||
this.strategy = injector.getInstance(CreateNodeAndPopulateAutomaticAttributesImpl.class);
|
||||
this.chef = injector.getInstance(ChefClient.class);
|
||||
|
|
|
@ -40,7 +40,7 @@ import com.google.common.collect.ImmutableSet;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", testName = "ohai.CreateNodeAndPopulateAutomaticAttributesImplTest")
|
||||
@Test(groups = { "unit" })
|
||||
public class CreateNodeAndPopulateAutomaticAttributesImplTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -30,13 +30,13 @@ import com.google.common.collect.ImmutableSet;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "chef.DeleteAllClientsAndNodesInListImplTest")
|
||||
@Test(groups = { "live" })
|
||||
public class DeleteAllClientsAndNodesInListImplLiveTest extends BaseChefStrategyLiveTest {
|
||||
private DeleteAllNodesInListImpl strategy;
|
||||
private CreateNodeAndPopulateAutomaticAttributesImpl creater;
|
||||
private ChefClient chef;
|
||||
|
||||
@BeforeTest(groups = "live", dependsOnMethods = "setupClient")
|
||||
@BeforeTest(groups = { "live" }, dependsOnMethods = "setupClient")
|
||||
void setupStrategy() {
|
||||
this.creater = injector.getInstance(CreateNodeAndPopulateAutomaticAttributesImpl.class);
|
||||
this.strategy = injector.getInstance(DeleteAllNodesInListImpl.class);
|
||||
|
|
|
@ -37,20 +37,20 @@ import com.google.common.collect.ImmutableSet;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "chef.GetNodesImplLiveTest")
|
||||
@Test(groups = { "live" })
|
||||
public class GetNodesImplLiveTest extends BaseChefStrategyLiveTest {
|
||||
private ListNodesImpl strategy;
|
||||
private CreateNodeAndPopulateAutomaticAttributesImpl creater;
|
||||
private ChefClient chef;
|
||||
|
||||
@BeforeTest(groups = "live", dependsOnMethods = "setupClient")
|
||||
@BeforeTest(groups = { "live" }, dependsOnMethods = "setupClient")
|
||||
void setupStrategy() {
|
||||
this.creater = injector.getInstance(CreateNodeAndPopulateAutomaticAttributesImpl.class);
|
||||
this.strategy = injector.getInstance(ListNodesImpl.class);
|
||||
this.chef = injector.getInstance(ChefClient.class);
|
||||
}
|
||||
|
||||
@BeforeTest(groups = "live", dependsOnMethods = "setupStrategy")
|
||||
@BeforeTest(groups = { "live" }, dependsOnMethods = "setupStrategy")
|
||||
void setupNodes() {
|
||||
creater.execute(prefix, ImmutableSet.<String> of());
|
||||
creater.execute(prefix + 1, ImmutableSet.<String> of());
|
||||
|
|
|
@ -44,7 +44,7 @@ import com.google.inject.Module;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "chef.UpdateAutomaticAttributesOnNodeImplLiveTest")
|
||||
@Test(groups = { "live" })
|
||||
public class UpdateAutomaticAttributesOnNodeImplLiveTest extends BaseChefStrategyLiveTest {
|
||||
private UpdateAutomaticAttributesOnNodeImpl strategy;
|
||||
private ChefClient chef;
|
||||
|
@ -61,7 +61,7 @@ public class UpdateAutomaticAttributesOnNodeImplLiveTest extends BaseChefStrateg
|
|||
modules.add(new TestOhaiModule());
|
||||
}
|
||||
|
||||
@BeforeTest(groups = "live", dependsOnMethods = "setupClient")
|
||||
@BeforeTest(groups = { "live" }, dependsOnMethods = "setupClient")
|
||||
void setupStrategy() {
|
||||
this.strategy = injector.getInstance(UpdateAutomaticAttributesOnNodeImpl.class);
|
||||
this.chef = injector.getInstance(ChefClient.class);
|
||||
|
|
|
@ -41,7 +41,7 @@ import com.google.common.collect.ImmutableSet;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", testName = "ohai.UpdateAutomaticAttributesOnNodeImplTest")
|
||||
@Test(groups = { "unit" })
|
||||
public class UpdateAutomaticAttributesOnNodeImplTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -45,7 +45,7 @@ import com.google.inject.Guice;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "integration", testName = "chef.TransientChefClientIntegrationTest")
|
||||
@Test(groups = { "integration" })
|
||||
public class TransientChefClientIntegrationTest extends BaseChefClientLiveTest {
|
||||
public void testCreateDatabag1() throws Exception {
|
||||
getAdminConnection().deleteDatabag(PREFIX);
|
||||
|
|
|
@ -34,7 +34,7 @@ import com.google.common.collect.ImmutableList;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", sequential = true, testName = "ohai.ChefUtilsTest")
|
||||
@Test(groups = { "unit" }, sequential = true)
|
||||
public class ChefUtilsTest {
|
||||
public static long millis = 1280251180727l;
|
||||
public static String millisString = "1280251180727";
|
||||
|
|
|
@ -46,7 +46,7 @@ import com.google.inject.Injector;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", testName = "ohai.JMXTest")
|
||||
@Test(groups = { "unit" })
|
||||
public class JMXTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -49,7 +49,7 @@ import com.google.inject.util.Providers;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", testName = "ohai.OhaiModuleTest")
|
||||
@Test(groups = { "unit" })
|
||||
public class OhaiModuleTest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -35,7 +35,7 @@ import com.google.inject.Injector;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", sequential = true, testName = "ohai.ByteArrayToMacAddressTest")
|
||||
@Test(groups = { "unit" }, sequential = true)
|
||||
public class ByteArrayToMacAddressTest {
|
||||
|
||||
private ByteArrayToMacAddress converter;
|
||||
|
|
|
@ -41,7 +41,7 @@ import com.google.inject.Injector;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", sequential = true, testName = "ohai.NestSlashKeysTest")
|
||||
@Test(groups = { "unit" }, sequential = true)
|
||||
public class NestSlashKeysTest {
|
||||
|
||||
private NestSlashKeys converter;
|
||||
|
|
Loading…
Reference in New Issue