From 98cae35ec6cce97f730cbc230549d99d56350ba0 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Mon, 3 May 2010 01:12:17 -0700 Subject: [PATCH] fixed unit test --- .../compute/functions/ServerToNodeMetadataTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rackspace/src/test/java/org/jclouds/rackspace/cloudservers/compute/functions/ServerToNodeMetadataTest.java b/rackspace/src/test/java/org/jclouds/rackspace/cloudservers/compute/functions/ServerToNodeMetadataTest.java index 8c85726351..2b1b89c724 100644 --- a/rackspace/src/test/java/org/jclouds/rackspace/cloudservers/compute/functions/ServerToNodeMetadataTest.java +++ b/rackspace/src/test/java/org/jclouds/rackspace/cloudservers/compute/functions/ServerToNodeMetadataTest.java @@ -39,12 +39,14 @@ public class ServerToNodeMetadataTest { expect(server.getId()).andReturn(10000).atLeastOnce(); expect(server.getName()).andReturn("adriancole-cloudservers-ea3").atLeastOnce(); + expect(server.getHostId()).andReturn("AHOST").atLeastOnce(); expect(server.getMetadata()).andReturn(ImmutableMap. of()).atLeastOnce(); expect(server.getStatus()).andReturn(ServerStatus.ACTIVE).atLeastOnce(); expect(serverStateToNodeState.get(ServerStatus.ACTIVE)).andReturn(NodeState.RUNNING); - Location location = new LocationImpl(LocationScope.ZONE, "dallas", "description", null); + Location provider = new LocationImpl(LocationScope.ZONE, "dallas", "description", null); + Location location = new LocationImpl(LocationScope.HOST, "AHOST", "AHOST", provider); Addresses addresses = createMock(Addresses.class); expect(server.getAddresses()).andReturn(addresses).atLeastOnce(); @@ -68,7 +70,7 @@ public class ServerToNodeMetadataTest { replay(images); ServerToNodeMetadata parser = new ServerToNodeMetadata(serverStateToNodeState, images, - location); + provider); NodeMetadata metadata = parser.apply(server); assertEquals(metadata.getLocation(), location);