mirror of https://github.com/apache/jclouds.git
better exception message
remoced unused import removed hokey test
This commit is contained in:
parent
c9f980e59e
commit
9791a51039
|
@ -51,7 +51,8 @@ public class ReturnCredentialsBoundToImage implements PopulateDefaultLoginCreden
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LoginCredentials apply(Object resourceToAuthenticate) {
|
public LoginCredentials apply(Object resourceToAuthenticate) {
|
||||||
checkState(resourceToAuthenticate instanceof Image, "this is only valid for images");
|
checkState(resourceToAuthenticate instanceof Image, "this is only valid for images, not %s",
|
||||||
|
resourceToAuthenticate.getClass().getSimpleName());
|
||||||
if (creds != null)
|
if (creds != null)
|
||||||
return creds;
|
return creds;
|
||||||
Image image = Image.class.cast(resourceToAuthenticate);
|
Image image = Image.class.cast(resourceToAuthenticate);
|
||||||
|
|
|
@ -37,7 +37,6 @@ import org.testng.annotations.Test;
|
||||||
|
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
import com.google.common.base.Supplier;
|
import com.google.common.base.Supplier;
|
||||||
import com.google.common.base.Suppliers;
|
|
||||||
|
|
||||||
public class Suppliers2Test {
|
public class Suppliers2Test {
|
||||||
|
|
||||||
|
|
|
@ -190,14 +190,14 @@ public class AWSAMIClientLiveTest extends BaseVersionedServiceLiveTest {
|
||||||
// TODO client.resetLaunchPermissionsOnImageInRegion(null, imageId);
|
// TODO client.resetLaunchPermissionsOnImageInRegion(null, imageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expectedExceptions = AuthorizationException.class)
|
@Test(enabled = false)
|
||||||
public void testGetLaunchPermissionForImage() {
|
public void testGetLaunchPermissionForImage() {
|
||||||
System.out.println(client.getLaunchPermissionForImageInRegion(null, imageId));
|
// TODO System.out.println(client.getLaunchPermissionForImageInRegion(null, imageId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expectedExceptions = AuthorizationException.class)
|
@Test(enabled = false)
|
||||||
public void testGetProductCodesForImage() {
|
public void testGetProductCodesForImage() {
|
||||||
System.out.println(client.getProductCodesForImageInRegion(null, imageId));
|
// TODO System.out.println(client.getProductCodesForImageInRegion(null, imageId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(enabled = false)
|
@Test(enabled = false)
|
||||||
|
|
Loading…
Reference in New Issue