You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2018/05/23 14:27:23 UTC

[GitHub] rhtyd closed pull request #2665: configdrive: run unit test only for Linux

rhtyd closed pull request #2665: configdrive: run unit test only for Linux
URL: https://github.com/apache/cloudstack/pull/2665
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/engine/storage/configdrive/test/org/apache/cloudstack/storage/configdrive/ConfigDriveBuilderTest.java b/engine/storage/configdrive/test/org/apache/cloudstack/storage/configdrive/ConfigDriveBuilderTest.java
index 50a4384d5c8..7e5a997a5a1 100644
--- a/engine/storage/configdrive/test/org/apache/cloudstack/storage/configdrive/ConfigDriveBuilderTest.java
+++ b/engine/storage/configdrive/test/org/apache/cloudstack/storage/configdrive/ConfigDriveBuilderTest.java
@@ -17,14 +17,8 @@
 
 package org.apache.cloudstack.storage.configdrive;
 
-import java.io.File;
 import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.util.Arrays;
-import java.util.List;
 
-import org.apache.commons.io.FileUtils;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -35,31 +29,4 @@ public void testConfigDriveIsoPath() throws IOException {
         Assert.assertEquals(ConfigDrive.createConfigDrivePath("i-x-y"), "configdrive/i-x-y/configdrive.iso");
     }
 
-    @Test
-    public void testConfigDriveBuild() throws IOException {
-        List<String[]> actualVmData = Arrays.asList(
-                new String[]{"userdata", "user_data", "c29tZSB1c2VyIGRhdGE="},
-                new String[]{"metadata", "service-offering", "offering"},
-                new String[]{"metadata", "availability-zone", "zone1"},
-                new String[]{"metadata", "local-hostname", "hostname"},
-                new String[]{"metadata", "local-ipv4", "192.168.111.111"},
-                new String[]{"metadata", "public-hostname", "7.7.7.7"},
-                new String[]{"metadata", "public-ipv4", "7.7.7.7"},
-                new String[]{"metadata", "vm-id", "uuid"},
-                new String[]{"metadata", "instance-id", "i-x-y"},
-                new String[]{"metadata", "public-keys", "ssh-rsa some-key"},
-                new String[]{"metadata", "cloud-identifier", String.format("CloudStack-{%s}", "uuid")},
-                new String[]{"password", "vm_password", "password123"}
-        );
-
-        final Path tempDir = Files.createTempDirectory(ConfigDrive.CONFIGDRIVEDIR);
-        final String isoData = ConfigDriveBuilder.buildConfigDrive(actualVmData, "i-x-y.iso", "config-2");
-        final File isoFile = ConfigDriveBuilder.base64StringToFile(isoData, tempDir.toAbsolutePath().toString(), ConfigDrive.CONFIGDRIVEFILENAME);
-
-        Assert.assertTrue(isoFile.exists());
-        Assert.assertTrue(isoFile.isFile());
-        Assert.assertTrue(isoFile.length() > 0L);
-
-        FileUtils.deleteDirectory(tempDir.toFile());
-    }
-}
\ No newline at end of file
+}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services