test is updated according to ssh auth exception type change

This commit is contained in:
Dmitri Babaev 2011-07-31 01:52:07 +04:00
parent 12aabec2a6
commit 0843d3bc7d
1 changed files with 3 additions and 2 deletions

View File

@ -49,6 +49,7 @@ import java.util.SortedSet;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import net.schmizz.sshj.userauth.UserAuthException;
import org.jclouds.compute.ComputeServiceContext; import org.jclouds.compute.ComputeServiceContext;
import org.jclouds.compute.ComputeServiceContextFactory; import org.jclouds.compute.ComputeServiceContextFactory;
import org.jclouds.compute.RunNodesException; import org.jclouds.compute.RunNodesException;
@ -150,8 +151,8 @@ public class NovaComputeServiceLiveTest extends ComputeBase {
.family(OsFamily.UBUNTU).description("ffoo").build())); .family(OsFamily.UBUNTU).description("ffoo").build()));
} }
@Test(expectedExceptions = AuthorizationException.class, expectedExceptionsMessageRegExp = "Auth fail", timeOut = 240000) @Test(expectedExceptions = UserAuthException.class, timeOut = 240000)
void testScriptExecutionWithWrongCredentials() throws Throwable, RunScriptOnNodesException, URISyntaxException, InterruptedException { void testScriptExecutionWithWrongCredentials() throws Throwable {
NodeMetadata node = getDefaultNodeImmediately(group); NodeMetadata node = getDefaultNodeImmediately(group);
String address = awaitForStartup(node.getId()); String address = awaitForStartup(node.getId());
awaitForSshPort(address, new Credentials("root", keyPair.get("private"))); awaitForSshPort(address, new Credentials("root", keyPair.get("private")));