Repository: jclouds
Updated Branches:
  refs/heads/master 640e04b31 -> 7c58f9d77


fix NovaComputeServiceExpectTest


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/c61fa9d0
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/c61fa9d0
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/c61fa9d0

Branch: refs/heads/master
Commit: c61fa9d02b508a4f15bb0219aea4ae3223b34453
Parents: 640e04b
Author: Andrea Turli <andrea.tu...@gmail.com>
Authored: Mon Aug 7 22:19:52 2017 +0200
Committer: Andrea Turli <andrea.tu...@gmail.com>
Committed: Wed Aug 9 11:15:59 2017 +0200

----------------------------------------------------------------------
 .../nova/v2_0/compute/NovaComputeServiceExpectTest.java       | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/c61fa9d0/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/compute/NovaComputeServiceExpectTest.java
----------------------------------------------------------------------
diff --git 
a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/compute/NovaComputeServiceExpectTest.java
 
b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/compute/NovaComputeServiceExpectTest.java
index 49cc969..5530be5 100644
--- 
a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/compute/NovaComputeServiceExpectTest.java
+++ 
b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/compute/NovaComputeServiceExpectTest.java
@@ -318,7 +318,8 @@ public class NovaComputeServiceExpectTest extends 
BaseNovaComputeServiceExpectTe
    public void testCreateNodeWhileUserSpecifiesKeyPairAndUserSpecifiedGroups() 
throws Exception {
       Builder<HttpRequest, HttpResponse> requestResponseMap = 
ImmutableMap.<HttpRequest, HttpResponse> builder()
             .putAll(defaultTemplateOpenStack);
-      requestResponseMap.put(list, notFound);
+      requestResponseMap.put(list, HttpResponse.builder().statusCode(200)
+              
.payload(payloadFromResource("/securitygroup_list.json")).build());
 
       requestResponseMap.put(getKeyPair, keyPairDetails);
 
@@ -348,7 +349,7 @@ public class NovaComputeServiceExpectTest extends 
BaseNovaComputeServiceExpectTe
             .addHeader("X-Auth-Token", authToken)
             .payload(
                   payloadFromStringWithContentType(
-                        
"{\"server\":{\"name\":\"test-0\",\"imageRef\":\"14\",\"flavorRef\":\"1\",\"key_name\":\"testkeypair\",\"security_groups\":[{\"name\":\"mygroup\"}]}}",
+                        
"{\"server\":{\"name\":\"test-0\",\"imageRef\":\"14\",\"flavorRef\":\"1\",\"key_name\":\"testkeypair\",\"security_groups\":[{\"name\":\"name1\"}]}}",
                         "application/json")).build();
 
       HttpResponse createdServer = 
HttpResponse.builder().statusCode(202).message("HTTP/1.1 202 Accepted")
@@ -378,7 +379,7 @@ public class NovaComputeServiceExpectTest extends 
BaseNovaComputeServiceExpectTe
       });
 
       NodeMetadata node = 
Iterables.getOnlyElement(apiThatCreatesNode.createNodesInGroup("test", 1,
-            
keyPairName("fooPair").securityGroups("mygroup").blockUntilRunning(false)));
+            
keyPairName("fooPair").securityGroups("name1").blockUntilRunning(false)));
       // we don't have access to this private key
       assertTrue(!node.getCredentials().getOptionalPrivateKey().isPresent());
    }

Reply via email to