Updated go version and reformatted

pull/6980/head
Amrita Dutta 8 years ago
parent a297d73b98
commit 213fbbae00

@ -42,11 +42,11 @@ type Artifact struct {
func NewManagedImageArtifact(osType, resourceGroup, name, location, id, osDiskSnapshotName, osDiskSnapshotPrefix string) (*Artifact, error) { func NewManagedImageArtifact(osType, resourceGroup, name, location, id, osDiskSnapshotName, osDiskSnapshotPrefix string) (*Artifact, error) {
return &Artifact{ return &Artifact{
ManagedImageResourceGroupName: resourceGroup, ManagedImageResourceGroupName: resourceGroup,
ManagedImageName: name, ManagedImageName: name,
ManagedImageLocation: location, ManagedImageLocation: location,
ManagedImageId: id, ManagedImageId: id,
OSType: osType, OSType: osType,
ManagedImageOSDiskSnapshotName: osDiskSnapshotName, ManagedImageOSDiskSnapshotName: osDiskSnapshotName,
ManagedImageDataDiskSnapshotPrefix: osDiskSnapshotPrefix, ManagedImageDataDiskSnapshotPrefix: osDiskSnapshotPrefix,
}, nil }, nil

@ -599,14 +599,14 @@ func TestConfigShouldRejectMalformedManagedImageOSDiskSnapshotName(t *testing.T)
func TestConfigShouldRejectMalformedManagedImageDataDiskSnapshotPrefix(t *testing.T) { func TestConfigShouldRejectMalformedManagedImageDataDiskSnapshotPrefix(t *testing.T) {
config := map[string]interface{}{ config := map[string]interface{}{
"image_offer": "ignore", "image_offer": "ignore",
"image_publisher": "ignore", "image_publisher": "ignore",
"image_sku": "ignore", "image_sku": "ignore",
"location": "ignore", "location": "ignore",
"subscription_id": "ignore", "subscription_id": "ignore",
"communicator": "none", "communicator": "none",
"managed_image_resource_group_name": "ignore", "managed_image_resource_group_name": "ignore",
"managed_image_name": "ignore", "managed_image_name": "ignore",
"managed_image_data_disk_snapshot_prefix": "ignore", "managed_image_data_disk_snapshot_prefix": "ignore",
// Does not matter for this test case, just pick one. // Does not matter for this test case, just pick one.
"os_type": constants.Target_Linux, "os_type": constants.Target_Linux,
@ -852,13 +852,13 @@ func TestConfigShouldRejectManagedImageOSDiskSnapshotNameWithoutManagedImageReso
func TestConfigShouldRejectImageDataDiskSnapshotPrefixWithoutManagedImageName(t *testing.T) { func TestConfigShouldRejectImageDataDiskSnapshotPrefixWithoutManagedImageName(t *testing.T) {
config := map[string]interface{}{ config := map[string]interface{}{
"image_offer": "ignore", "image_offer": "ignore",
"image_publisher": "ignore", "image_publisher": "ignore",
"image_sku": "ignore", "image_sku": "ignore",
"location": "ignore", "location": "ignore",
"subscription_id": "ignore", "subscription_id": "ignore",
"communicator": "none", "communicator": "none",
"managed_image_resource_group_name": "ignore", "managed_image_resource_group_name": "ignore",
"managed_image_data_disk_snapshot_prefix": "ignore", "managed_image_data_disk_snapshot_prefix": "ignore",
// Does not matter for this test case, just pick one. // Does not matter for this test case, just pick one.
"os_type": constants.Target_Linux, "os_type": constants.Target_Linux,
@ -872,13 +872,13 @@ func TestConfigShouldRejectImageDataDiskSnapshotPrefixWithoutManagedImageName(t
func TestConfigShouldRejectImageDataDiskSnapshotPrefixWithoutManagedImageResourceGroupName(t *testing.T) { func TestConfigShouldRejectImageDataDiskSnapshotPrefixWithoutManagedImageResourceGroupName(t *testing.T) {
config := map[string]interface{}{ config := map[string]interface{}{
"image_offer": "ignore", "image_offer": "ignore",
"image_publisher": "ignore", "image_publisher": "ignore",
"image_sku": "ignore", "image_sku": "ignore",
"location": "ignore", "location": "ignore",
"subscription_id": "ignore", "subscription_id": "ignore",
"communicator": "none", "communicator": "none",
"managed_image_name": "ignore", "managed_image_name": "ignore",
"managed_image_data_disk_snapshot_prefix": "ignore", "managed_image_data_disk_snapshot_prefix": "ignore",
// Does not matter for this test case, just pick one. // Does not matter for this test case, just pick one.
"os_type": constants.Target_Linux, "os_type": constants.Target_Linux,
@ -1002,7 +1002,7 @@ func TestConfigShouldRejectCustomAndPlatformManagedImageBuild(t *testing.T) {
func TestConfigShouldRejectCustomAndImageUrlForManagedImageBuild(t *testing.T) { func TestConfigShouldRejectCustomAndImageUrlForManagedImageBuild(t *testing.T) {
config := map[string]interface{}{ config := map[string]interface{}{
"image_url": "ignore", "image_url": "ignore",
"custom_managed_image_resource_group_name": "ignore", "custom_managed_image_resource_group_name": "ignore",
"custom_managed_image_name": "ignore", "custom_managed_image_name": "ignore",
"location": "ignore", "location": "ignore",

@ -24,7 +24,7 @@ type resourceResolver struct {
func newResourceResolver(client *AzureClient) *resourceResolver { func newResourceResolver(client *AzureClient) *resourceResolver {
return &resourceResolver{ return &resourceResolver{
client: client, client: client,
findVirtualNetworkResourceGroup: findVirtualNetworkResourceGroup, findVirtualNetworkResourceGroup: findVirtualNetworkResourceGroup,
findVirtualNetworkSubnet: findVirtualNetworkSubnet, findVirtualNetworkSubnet: findVirtualNetworkSubnet,
} }

@ -261,10 +261,10 @@ growpart:
// Ensure the VM template is correct when building from a custom managed image. // Ensure the VM template is correct when building from a custom managed image.
func TestVirtualMachineDeployment08(t *testing.T) { func TestVirtualMachineDeployment08(t *testing.T) {
config := map[string]interface{}{ config := map[string]interface{}{
"location": "ignore", "location": "ignore",
"subscription_id": "ignore", "subscription_id": "ignore",
"os_type": constants.Target_Linux, "os_type": constants.Target_Linux,
"communicator": "none", "communicator": "none",
"custom_managed_image_resource_group_name": "CustomManagedImageResourceGroupName", "custom_managed_image_resource_group_name": "CustomManagedImageResourceGroupName",
"custom_managed_image_name": "CustomManagedImageName", "custom_managed_image_name": "CustomManagedImageName",
"managed_image_name": "ManagedImageName", "managed_image_name": "ManagedImageName",

Loading…
Cancel
Save