update to reflect get network errors

This commit is contained in:
Adrian Cole 2010-03-11 08:25:09 -08:00
parent 2210fe47f0
commit b36d68417c
1 changed files with 15 additions and 1 deletions

View File

@ -24,6 +24,7 @@ import static org.testng.Assert.assertEquals;
import java.util.Map;
import org.jclouds.compute.domain.Image;
import org.jclouds.http.HttpResponseException;
import org.jclouds.vcloud.VCloudClient;
import org.jclouds.vcloud.VCloudMediaType;
import org.jclouds.vcloud.compute.VCloudComputeServiceLiveTest;
@ -95,6 +96,19 @@ public class BlueLockVCloudComputeServiceLiveTest extends VCloudComputeServiceLi
// get details on a specific template I know by name
bluelockClient.getVAppTemplate(vAppTemplatesByName
.get("Ubuntu904Serverx64 1CPUx1GBx20GB a01").getId());
}
@Test
public void testErrorWhereAllNetworksReturn403() throws Exception {
VCloudClient bluelockClient = VCloudClient.class.cast(context.getProviderSpecificContext()
.getApi());
for (String i : new String[] { "1", "2", "3", "4" }) {
try {
bluelockClient.getNetwork(i);
} catch (HttpResponseException e) {
assertEquals(e.getResponse().getStatusCode(), 403);
}
}
}
}