testTemplateBuilderCanUseImageId: use new context when building with imageId

This commit is contained in:
Aled Sage 2011-12-11 16:40:25 +00:00
parent dc181287f6
commit 60af7f454f
1 changed files with 3 additions and 1 deletions

View File

@ -163,8 +163,10 @@ public abstract class BaseTemplateBuilderLiveTest extends BaseVersionedServiceLi
} }
@Test @Test
public void testTemplateBuilderCanUseImageId() { public void testTemplateBuilderCanUseImageId() throws Exception {
Template defaultTemplate = context.getComputeService().templateBuilder().build(); Template defaultTemplate = context.getComputeService().templateBuilder().build();
context.close();
setupClient();
Template template = context.getComputeService().templateBuilder().imageId(defaultTemplate.getImage().getId()) Template template = context.getComputeService().templateBuilder().imageId(defaultTemplate.getImage().getId())
.locationId(defaultTemplate.getLocation().getId()).build(); .locationId(defaultTemplate.getLocation().getId()).build();