Repository: jclouds
Updated Branches:
  refs/heads/master d98348d50 -> 8e0e781df


GCE live test fixes


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

Branch: refs/heads/master
Commit: 8e0e781df099d685e6cc4046cf16ff05d98483cf
Parents: d98348d
Author: Ignasi Barrera <[email protected]>
Authored: Wed Sep 21 17:58:07 2016 +0200
Committer: Ignasi Barrera <[email protected]>
Committed: Mon Sep 26 13:25:46 2016 +0200

----------------------------------------------------------------------
 .../config/GoogleComputeEngineServiceContextModule.java     | 3 +++
 .../org/jclouds/googlecomputeengine/domain/Instance.java    | 2 +-
 .../compute/GoogleComputeEngineServiceLiveTest.java         | 9 +++++----
 .../compute/functions/InstanceToNodeMetadataTest.java       | 2 --
 .../googlecomputeengine/features/InstanceApiLiveTest.java   | 1 -
 .../features/InstanceApiWindowsLiveTest.java                | 2 +-
 .../googlecomputeengine/features/TargetPoolApiLiveTest.java | 7 ++++---
 7 files changed, 14 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/8e0e781d/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/config/GoogleComputeEngineServiceContextModule.java
----------------------------------------------------------------------
diff --git 
a/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/config/GoogleComputeEngineServiceContextModule.java
 
b/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/config/GoogleComputeEngineServiceContextModule.java
index 8c35f32..10c4d6e 100644
--- 
a/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/config/GoogleComputeEngineServiceContextModule.java
+++ 
b/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/config/GoogleComputeEngineServiceContextModule.java
@@ -80,6 +80,8 @@ import com.google.inject.Provides;
 import com.google.inject.Scopes;
 import com.google.inject.TypeLiteral;
 import org.jclouds.compute.domain.internal.TemplateBuilderImpl;
+import org.jclouds.compute.functions.NodeAndTemplateOptionsToStatement;
+import 
org.jclouds.compute.functions.NodeAndTemplateOptionsToStatementWithoutPublicKey;
 import 
org.jclouds.googlecomputeengine.compute.domain.internal.GoogleComputeEngineArbitraryCpuRamTemplateBuilderImpl;
 
 public final class GoogleComputeEngineServiceContextModule
@@ -116,6 +118,7 @@ public final class GoogleComputeEngineServiceContextModule
             .to(CreateNodesWithGroupEncodedIntoNameThenAddToSet.class);
 
       bind(TemplateOptions.class).to(GoogleComputeEngineTemplateOptions.class);
+      
bind(NodeAndTemplateOptionsToStatement.class).to(NodeAndTemplateOptionsToStatementWithoutPublicKey.class);
 
       bind(new TypeLiteral<Function<Set<? extends NodeMetadata>, 
Set<String>>>() {
       }).to(OrphanedGroupsFromDeadNodes.class);

http://git-wip-us.apache.org/repos/asf/jclouds/blob/8e0e781d/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Instance.java
----------------------------------------------------------------------
diff --git 
a/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Instance.java
 
b/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Instance.java
index 957f5dc..6946a3c 100644
--- 
a/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Instance.java
+++ 
b/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Instance.java
@@ -137,7 +137,7 @@ public abstract class Instance {
    @AutoValue
    public abstract static class SerialPortOutput {
 
-      public abstract URI selfLink();
+      @Nullable public abstract URI selfLink();
 
       /** The contents of the console output. */
       public abstract String contents();

http://git-wip-us.apache.org/repos/asf/jclouds/blob/8e0e781d/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineServiceLiveTest.java
----------------------------------------------------------------------
diff --git 
a/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineServiceLiveTest.java
 
b/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineServiceLiveTest.java
index 019fdd4..bfddd98 100644
--- 
a/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineServiceLiveTest.java
+++ 
b/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineServiceLiveTest.java
@@ -29,10 +29,6 @@ import java.net.URI;
 import java.util.Properties;
 import java.util.Set;
 
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterables;
-import com.google.inject.Module;
 import org.jclouds.compute.ComputeServiceContext;
 import org.jclouds.compute.domain.Hardware;
 import org.jclouds.compute.domain.NodeMetadata;
@@ -49,6 +45,11 @@ import org.jclouds.rest.AuthorizationException;
 import org.jclouds.sshj.config.SshjSshClientModule;
 import org.testng.annotations.Test;
 
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Iterables;
+import com.google.inject.Module;
+
 @Test(groups = "live", singleThreaded = true)
 public class GoogleComputeEngineServiceLiveTest extends 
BaseComputeServiceLiveTest {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/8e0e781d/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/functions/InstanceToNodeMetadataTest.java
----------------------------------------------------------------------
diff --git 
a/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/functions/InstanceToNodeMetadataTest.java
 
b/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/functions/InstanceToNodeMetadataTest.java
index a4d9925..93ee6c5 100644
--- 
a/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/functions/InstanceToNodeMetadataTest.java
+++ 
b/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/functions/InstanceToNodeMetadataTest.java
@@ -117,7 +117,6 @@ public class InstanceToNodeMetadataTest {
    private Set<Hardware> hardwares;
    private URI imageUrl = new ParseImageTest().expected().selfLink();
    private Set<Location> locations;
-   private InstanceToNodeMetadata groupGroupNodeParser;
    private InstanceToNodeMetadata groupNullNodeParser;
 
    @BeforeMethod
@@ -139,7 +138,6 @@ public class InstanceToNodeMetadataTest {
                new LocationBuilder().id("0").description("mock parent 
location").scope(LocationScope.PROVIDER)
                .build()).build());
 
-      groupGroupNodeParser = createNodeParser(hardwares, locations, "Group");
       groupNullNodeParser = createNodeParser(hardwares, locations, null);
    }
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/8e0e781d/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/InstanceApiLiveTest.java
----------------------------------------------------------------------
diff --git 
a/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/InstanceApiLiveTest.java
 
b/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/InstanceApiLiveTest.java
index 148ecb3..9f202e2 100644
--- 
a/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/InstanceApiLiveTest.java
+++ 
b/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/InstanceApiLiveTest.java
@@ -184,7 +184,6 @@ public class InstanceApiLiveTest extends 
BaseGoogleComputeEngineApiLiveTest {
    public void testGetSerialPortOutput() {
       SerialPortOutput output = api().getSerialPortOutput(INSTANCE_NAME);
       assertNotNull(output);
-      assertNotNull(output.selfLink());
       assertNotNull(output.contents());
    }
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/8e0e781d/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/InstanceApiWindowsLiveTest.java
----------------------------------------------------------------------
diff --git 
a/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/InstanceApiWindowsLiveTest.java
 
b/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/InstanceApiWindowsLiveTest.java
index eb9a5b9..3fb043c 100644
--- 
a/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/InstanceApiWindowsLiveTest.java
+++ 
b/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/InstanceApiWindowsLiveTest.java
@@ -47,7 +47,7 @@ import java.util.concurrent.atomic.AtomicReference;
 import static 
org.jclouds.googlecomputeengine.options.ListOptions.Builder.filter;
 import static org.testng.Assert.assertFalse;
 
-@Test(groups = "live", testName = "InstanceApiLiveTest")
+@Test(groups = "live", testName = "InstanceApiWindowsLiveTest")
 public class InstanceApiWindowsLiveTest extends 
BaseGoogleComputeEngineApiLiveTest {
 
    private static final String INSTANCE_NETWORK_NAME = 
"instance-api-live-test-network";

http://git-wip-us.apache.org/repos/asf/jclouds/blob/8e0e781d/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/TargetPoolApiLiveTest.java
----------------------------------------------------------------------
diff --git 
a/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/TargetPoolApiLiveTest.java
 
b/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/TargetPoolApiLiveTest.java
index b5957c2..dab8cda 100644
--- 
a/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/TargetPoolApiLiveTest.java
+++ 
b/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/TargetPoolApiLiveTest.java
@@ -45,11 +45,12 @@ import com.google.common.base.Predicate;
 import com.google.common.collect.FluentIterable;
 import com.google.common.collect.Iterables;
 
+@Test(groups = "live", testName = "TargetPoolApiLiveTest")
 public class TargetPoolApiLiveTest extends BaseGoogleComputeEngineApiLiveTest {
 
    private static final String BACKUP_TARGETPOOL_NAME = 
"targetpool-api-live-test-backup";
    private static final String TARGETPOOL_NAME = 
"targetpool-api-live-test-primary";
-   private static final String THIRD_TARGETPOOL_NAME = 
"targetpool-apo-live-test-third";
+   private static final String THIRD_TARGETPOOL_NAME = 
"targetpool-api-live-test-third";
    private static final String DESCRIPTION = "A New TargetPool!";
    private static final String DESCRIPTION_BACKUP = "A backup target pool!";
 
@@ -226,14 +227,14 @@ public class TargetPoolApiLiveTest extends 
BaseGoogleComputeEngineApiLiveTest {
    @Test(groups = "live", dependsOnMethods = {"testInsertTargetPool2"})
    public void testListBackupTargetPool() {
       TargetPoolCreationOptions options = new 
TargetPoolCreationOptions.Builder(THIRD_TARGETPOOL_NAME)
-      .description("A targetPool for testing setBackup.").build();
+            .description("A targetPool for testing setBackup.").build();
       assertOperationDoneSuccessfully(api().create(options));
       TargetPool targetPool = api().get(THIRD_TARGETPOOL_NAME);
       assertNotNull(targetPool);
       assertEquals(targetPool.name(), THIRD_TARGETPOOL_NAME);
       assertEquals(targetPool.backupPool(), null);
 
-      URI selfLink = api().get(TARGETPOOL_NAME).selfLink();
+      URI selfLink = api().get(BACKUP_TARGETPOOL_NAME).selfLink();
 
       Float failoverRatio = Float.valueOf((float) 0.5);
       assertOperationDoneSuccessfully(api().setBackup(THIRD_TARGETPOOL_NAME, 
failoverRatio, selfLink));

Reply via email to