Skip to content
Permalink
Browse files
fix domain object
- fix VirtuaMachineMockTest
  • Loading branch information
andreaturli committed Oct 25, 2017
1 parent 58cb92b commit 02c02a361d2a35b9c1f74b27e7fe468a6a8b5870
Showing 5 changed files with 19 additions and 19 deletions.
@@ -150,13 +150,13 @@ public abstract static class AdditionalUnattendContent {

public abstract String content();

@SerializedNames({"pass", "component", "settingName", "content"})
public static AdditionalUnattendContent create(final String pass, final String component,
@SerializedNames({"passName", "componentName", "settingName", "content"})
public static AdditionalUnattendContent create(final String passName, final String componentName,
final String settingName,
final String content) {

return new AutoValue_OSProfile_WindowsConfiguration_AdditionalUnattendContent(
pass, component, settingName, content);
passName, componentName, settingName, content);
}
}

@@ -16,12 +16,6 @@
*/
package org.jclouds.azurecompute.arm.features;

import static com.google.common.collect.Iterables.isEmpty;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertTrue;

import java.net.URI;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
@@ -59,6 +53,12 @@
import com.google.common.collect.ImmutableMap;
import com.squareup.okhttp.mockwebserver.MockResponse;

import static com.google.common.collect.Iterables.isEmpty;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertTrue;

@Test(groups = "unit", testName = "VirtualMachineApiMockTest", singleThreaded = true)
public class VirtualMachineApiMockTest extends BaseAzureComputeApiMockTest {

@@ -141,7 +141,7 @@ public void testCreateWithPlan() throws Exception {
+ "\"managedDisk\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk\",\"storageAccountType\":\"Standard_LRS\"}},"
+ "\"dataDisks\":[{\"name\":\"mydatadisk1\",\"diskSizeGB\":\"1\",\"lun\":0,\"createOption\":\"Empty\",\"caching\":\"ReadWrite\",\"managedDisk\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk\",\"storageAccountType\":\"Standard_LRS\"}}]},"
+ "\"osProfile\":{\"computerName\":\"windowsmachine\",\"adminUsername\":\"azureuser\",\"adminPassword\":\"password\",\"customData\":\"\",\"windowsConfiguration\":{\"provisionVMAgent\":false,"
+ "\"winRM\":{\"listeners\":[{\"protocol\":\"https\",\"certificateUrl\":\"url-to-certificate\"}]},\"additionalUnattendContent\":[{\"pass\":\"oobesystem\",\"component\":\"Microsoft-Windows-Shell-Setup\",\"settingName\":\"FirstLogonCommands\",\"content\":\"<XML unattend content>\"}],"
+ "\"winRM\":{\"listeners\":[{\"protocol\":\"https\",\"certificateUrl\":\"url-to-certificate\"}]},\"additionalUnattendContent\":[{\"passName\":\"oobesystem\",\"componentName\":\"Microsoft-Windows-Shell-Setup\",\"settingName\":\"FirstLogonCommands\",\"content\":\"<XML unattend content>\"}],"
+ "\"enableAutomaticUpdates\":true},"
+ "\"secrets\":[{\"sourceVault\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup1/providers/Microsoft.KeyVault/vaults/myvault1\"},\"vaultCertificates\":[{\"certificateUrl\":\"https://myvault1.vault.azure.net/secrets/SECRETNAME/SECRETVERSION\",\"certificateStore\":\"CERTIFICATESTORENAME\"}]}]},"
+ "\"networkProfile\":{\"networkInterfaces\":[{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Network/networkInterfaces/windowsmachine167\"}]},"
@@ -176,7 +176,7 @@ public void testCreate() throws Exception {
+ "\"managedDisk\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk\",\"storageAccountType\":\"Standard_LRS\"}},"
+ "\"dataDisks\":[{\"name\":\"mydatadisk1\",\"diskSizeGB\":\"1\",\"lun\":0,\"createOption\":\"Empty\",\"caching\":\"ReadWrite\",\"managedDisk\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk\",\"storageAccountType\":\"Standard_LRS\"}}]},"
+ "\"osProfile\":{\"computerName\":\"windowsmachine\",\"adminUsername\":\"azureuser\",\"adminPassword\":\"password\",\"customData\":\"\",\"windowsConfiguration\":{\"provisionVMAgent\":false,"
+ "\"winRM\":{\"listeners\":[{\"protocol\":\"https\",\"certificateUrl\":\"url-to-certificate\"}]},\"additionalUnattendContent\":[{\"pass\":\"oobesystem\",\"component\":\"Microsoft-Windows-Shell-Setup\",\"settingName\":\"FirstLogonCommands\",\"content\":\"<XML unattend content>\"}],"
+ "\"winRM\":{\"listeners\":[{\"protocol\":\"https\",\"certificateUrl\":\"url-to-certificate\"}]},\"additionalUnattendContent\":[{\"passName\":\"oobesystem\",\"componentName\":\"Microsoft-Windows-Shell-Setup\",\"settingName\":\"FirstLogonCommands\",\"content\":\"<XML unattend content>\"}],"
+ "\"enableAutomaticUpdates\":true},"
+ "\"secrets\":[{\"sourceVault\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup1/providers/Microsoft.KeyVault/vaults/myvault1\"},\"vaultCertificates\":[{\"certificateUrl\":\"https://myvault1.vault.azure.net/secrets/SECRETNAME/SECRETVERSION\",\"certificateStore\":\"CERTIFICATESTORENAME\"}]}]},"
+ "\"networkProfile\":{\"networkInterfaces\":[{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Network/networkInterfaces/windowsmachine167\"}]},"
@@ -58,8 +58,8 @@
},
"additionalUnattendContent": [
{
"pass":"oobesystem",
"component":"Microsoft-Windows-Shell-Setup",
"passName":"oobesystem",
"componentName":"Microsoft-Windows-Shell-Setup",
"settingName":"FirstLogonCommands",
"content":"<XML unattend content>"
}
@@ -57,8 +57,8 @@
},
"additionalUnattendContent":[
{
"pass":"oobesystem",
"component":"Microsoft-Windows-Shell-Setup",
"passName":"oobesystem",
"componentName":"Microsoft-Windows-Shell-Setup",
"settingName":"FirstLogonCommands",
"content":"<XML unattend content>"
}
@@ -58,8 +58,8 @@
},
"additionalUnattendContent":[
{
"pass":"oobesystem",
"component":"Microsoft-Windows-Shell-Setup",
"passName":"oobesystem",
"componentName":"Microsoft-Windows-Shell-Setup",
"settingName":"FirstLogonCommands",
"content":"<XML unattend content>"
}
@@ -158,8 +158,8 @@
},
"additionalUnattendContent":[
{
"pass":"oobesystem",
"component":"Microsoft-Windows-Shell-Setup",
"passName":"oobesystem",
"componentName":"Microsoft-Windows-Shell-Setup",
"settingName":"FirstLogonCommands",
"content":"<XML unattend content>"
}

0 comments on commit 02c02a3

Please sign in to comment.