package org.ow2.choreos.deployment.nodes.cloudprovider;

import static org.junit.Assert.assertTrue;

import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.ow2.choreos.nodes.NodeNotCreatedException;
import org.ow2.choreos.nodes.datamodel.Node;
import org.ow2.choreos.services.datamodel.ResourceImpact;
import org.ow2.choreos.tests.IntegrationTest;
import org.ow2.choreos.utils.SshUtil;

/**
 * Please, before running these tests, read the README file
 * 
 * @author leonardo
 */
@Category(IntegrationTest.class)
public class FixedConnectionTest {

	@Test
	public void shouldConnectToTheNode() throws NodeNotCreatedException {

		CloudProvider cp = new FixedCloudProvider();
		Node node = cp.createOrUseExistingNode(new Node(), new ResourceImpact());

		SshUtil ssh = null;
		ssh = new SshUtil(node.getIp(), node.getUser(),
				node.getPrivateKeyFile());
		assertTrue(ssh.isAccessible());
		ssh.disconnect();
	}

}

@@ -94,16 +94,46 @@
 tTrue;%0A%0A
+import org.junit.BeforeClass;%0A
 import o
@@ -143,24 +143,24 @@
 junit.Test;%0A
-
 import org.j
@@ -397,24 +397,70 @@
 rationTest;%0A
+import org.ow2.choreos.utils.LogConfigurator;%0A
 import org.o
@@ -647,16 +647,101 @@
 Test %7B%0A%0A
+%09@BeforeClass%0A%09public static void setupClass() %7B%0A%09%09LogConfigurator.configLog();%0A%09%7D%0A%09%0A
 %09@Test%0A%09

configure log on FixedConnectionTest