Skip to content

Commit

Permalink
Fix Compute Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
huangpf committed Jan 30, 2017
1 parent 01e68af commit e588c7f
Show file tree
Hide file tree
Showing 137 changed files with 47,270 additions and 32,850 deletions.
2 changes: 1 addition & 1 deletion lib/commands/arm/vmss/vmss._js
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ exports.init = function (cli) {
var parametersObj = {
name : options.name,
location : options.location,
overProvision : false,
overprovision : false,
sku : {
capacity : options.skuCapacity,
name : options.skuName,
Expand Down
32 changes: 18 additions & 14 deletions test/commands/arm/vmss/arm.vmss-parameter-create-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ describe('arm', function() {
var cmd = util.format('vmss config create --parameter-file %s', paramFileName).split(' ');
testUtils.executeCommand(suite, retry, cmd, function(result) {
result.exitStatus.should.equal(0);
var cmd = makeCommandStr('virtual-machine-scale-set', 'set', paramFileName, util.format('--name %s --location %s --over-provision false', vmssPrefix5, location)).split(' ');
var cmd = makeCommandStr('virtual-machine-scale-set', 'set', paramFileName, util.format('--name %s --location %s --overprovision false', vmssPrefix5, location)).split(' ');
testUtils.executeCommand(suite, retry, cmd, function(result) {
result.exitStatus.should.equal(0);
var cmd = makeCommandStr('virtual-machine-scale-set', 'delete', paramFileName, '--type --tags --provisioning-state').split(' ');
var cmd = makeCommandStr('virtual-machine-scale-set', 'delete', paramFileName, '--type --tags --provisioning-state --plan').split(' ');
testUtils.executeCommand(suite, retry, cmd, function(result) {
result.exitStatus.should.equal(0);
var cmd = makeCommandStr('sku', 'set', paramFileName, '--capacity ' + vmssCapacity + ' --name ' + VMTestUtil.vmSize + ' --tier Standard').split(' ');
Expand Down Expand Up @@ -194,34 +194,38 @@ describe('arm', function() {
var cmd = makeCommandStr('os-profile', 'set', paramFileName, util.format('--computer-name-prefix test --admin-username %s --admin-password %s', username, password)).split(' ');
testUtils.executeCommand(suite, retry, cmd, function(result) {
result.exitStatus.should.equal(0);
var cmd = makeCommandStr('image-reference', 'set', paramFileName, '--publisher MicrosoftWindowsServer --offer WindowsServer --sku 2012-R2-Datacenter --version latest').split(' ');
var cmd = makeCommandStr('storage-profile', 'delete', paramFileName, '--data-disks').split(' ');
testUtils.executeCommand(suite, retry, cmd, function(result) {
result.exitStatus.should.equal(0);
var cmd = makeCommandStr('os-disk', 'set', paramFileName, '--caching None --create-option fromImage --name test').split(' ');
var cmd = makeCommandStr('image-reference', 'set', paramFileName, '--publisher MicrosoftWindowsServer --offer WindowsServer --sku 2012-R2-Datacenter --version latest').split(' ');
testUtils.executeCommand(suite, retry, cmd, function(result) {
result.exitStatus.should.equal(0);
var cmd = makeCommandStr('os-disk', 'delete', paramFileName, '--os-type --image').split(' ');
var cmd = makeCommandStr('os-disk', 'set', paramFileName, '--caching None --create-option fromImage --name test').split(' ');
testUtils.executeCommand(suite, retry, cmd, function(result) {
result.exitStatus.should.equal(0);
var cmd = makeCommandStr('vhd-containers', 'delete', paramFileName, '--index 0').split(' ');
var cmd = makeCommandStr('os-disk', 'delete', paramFileName, '--os-type --image --managed-disk').split(' ');
testUtils.executeCommand(suite, retry, cmd, function(result) {
result.exitStatus.should.equal(0);
var cmd = makeCommandStr('vhd-containers', 'set', paramFileName, util.format('--index 0 --value https://%s.blob.core.windows.net/%s', storageAccount, storageCont)).split(' ');
testUtils.executeCommand(suite, retry, cmd, function(result) {
var cmd = makeCommandStr('vhd-containers', 'delete', paramFileName, '--index 0').split(' ');
testUtils.executeCommand(suite, retry, cmd, function(result) {
result.exitStatus.should.equal(0);
var cmd = makeCommandStr('vhd-containers', 'set', paramFileName, util.format('--index 1 --value https://%s.blob.core.windows.net/%s', storageAccount2, storageCont2)).split(' ');
testUtils.executeCommand(suite, retry, cmd, function(result) {
var cmd = makeCommandStr('vhd-containers', 'set', paramFileName, util.format('--index 0 --value https://%s.blob.core.windows.net/%s', storageAccount, storageCont)).split(' ');
testUtils.executeCommand(suite, retry, cmd, function(result) {
result.exitStatus.should.equal(0);
var cmd = makeCommandStr('vhd-containers', 'set', paramFileName, util.format('--index 2 --value https://%s.blob.core.windows.net/%s', storageAccount3, storageCont3)).split(' ');
var cmd = makeCommandStr('vhd-containers', 'set', paramFileName, util.format('--index 1 --value https://%s.blob.core.windows.net/%s', storageAccount2, storageCont2)).split(' ');
testUtils.executeCommand(suite, retry, cmd, function(result) {
result.exitStatus.should.equal(0);
var cmd = makeCommandStr('extensions', 'set', paramFileName, util.format('--index 0 --name test --publisher %s --type %s --type-handler-version %s --auto-upgrade-minor-version true', publisher, vmaExtName, vmaExtVer)).split(' ');
var cmd = makeCommandStr('vhd-containers', 'set', paramFileName, util.format('--index 2 --value https://%s.blob.core.windows.net/%s', storageAccount3, storageCont3)).split(' ');
testUtils.executeCommand(suite, retry, cmd, function(result) {
result.exitStatus.should.equal(0);
var cmd = util.format('vmss create -g %s -n %s --parameter-file %s --json', groupName, vmssPrefix5, paramFileName).split(' ');
var cmd = makeCommandStr('extensions', 'set', paramFileName, util.format('--index 0 --name test --publisher %s --type %s --type-handler-version %s --auto-upgrade-minor-version true', publisher, vmaExtName, vmaExtVer)).split(' ');
testUtils.executeCommand(suite, retry, cmd, function(result) {
result.exitStatus.should.equal(0);
done();
var cmd = util.format('vmss create -g %s -n %s --parameter-file %s --json', groupName, vmssPrefix5, paramFileName).split(' ');
testUtils.executeCommand(suite, retry, cmd, function(result) {
result.exitStatus.should.equal(0);
done();
});
});
});
});
Expand Down
10 changes: 5 additions & 5 deletions test/data/containerParam.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
},
"masterProfile": {
"count": 1,
"dnsPrefix": "xplatContainer6280master",
"dnsPrefix": "xplatContainer9457master",
"fqdn": ""
},
"agentPoolProfiles": [
{
"name": "xplatContainer6280a1",
"name": "xplatContainer9457a1",
"count": 2,
"vmSize": "Standard_A1",
"dnsPrefix": "xplatContainer6280a2",
"dnsPrefix": "xplatContainer9457a2",
"fqdn": ""
}
],
Expand All @@ -28,8 +28,8 @@
}
},
"id": null,
"name": "xplatContainer6280",
"name": "xplatContainer9457",
"type": null,
"location": "australiasoutheast",
"location": "eastus",
"tags": {}
}
10 changes: 5 additions & 5 deletions test/data/containerParam2.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
},
"masterProfile": {
"count": 1,
"dnsPrefix": "xplatContainer21067master",
"dnsPrefix": "xplatContainer29931master",
"fqdn": ""
},
"agentPoolProfiles": [
{
"name": "xplatContainer21067a1",
"name": "xplatContainer29931a1",
"count": 1,
"vmSize": "Standard_A1",
"dnsPrefix": "xplatContainer21067a2",
"dnsPrefix": "xplatContainer29931a2",
"fqdn": ""
}
],
Expand All @@ -28,8 +28,8 @@
}
},
"id": null,
"name": "xplatContainer21067",
"name": "xplatContainer29931",
"type": null,
"location": "australiasoutheast",
"location": "eastus",
"tags": {}
}
33 changes: 28 additions & 5 deletions test/data/vmssParamTest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
"tier": "",
"capacity": null
},
"plan": {
"name": "",
"publisher": "",
"product": "",
"promotionCode": ""
},
"upgradePolicy": {
"mode": null
},
Expand Down Expand Up @@ -64,7 +70,8 @@
"publisher": "",
"offer": "",
"sku": "",
"version": ""
"version": "",
"id": ""
},
"osDisk": {
"name": "",
Expand All @@ -76,8 +83,23 @@
},
"vhdContainers": [
""
]
}
],
"managedDisk": {
"storageAccountType": null
}
},
"dataDisks": [
{
"name": "",
"lun": "",
"caching": null,
"createOption": "",
"diskSizeGB": null,
"managedDisk": {
"storageAccountType": null
}
}
]
},
"networkProfile": {
"networkInterfaceConfigurations": [
Expand Down Expand Up @@ -123,13 +145,14 @@
"settings": {},
"protectedSettings": {},
"provisioningState": "",
"id": ""
"id": null
}
]
}
},
"provisioningState": "",
"overProvision": null,
"overprovision": null,
"singlePlacementGroup": null,
"id": null,
"name": null,
"type": null,
Expand Down
18 changes: 10 additions & 8 deletions test/data/vmssParamTest5.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2012-R2-Datacenter",
"version": "latest"
"version": "latest",
"id": ""
},
"osDisk": {
"name": "test",
"caching": "None",
"createOption": "fromImage",
"vhdContainers": [
"https://xplatteststorage16018.blob.core.windows.net/xplatteststoragecnt12103",
"https://xplatteststorage26659.blob.core.windows.net/xplatteststoragecnt24121",
"https://xplatteststorage37766.blob.core.windows.net/xplatteststoragecnt39401"
"https://xplatteststorage19579.blob.core.windows.net/xplatteststoragecnt15465",
"https://xplatteststorage22251.blob.core.windows.net/xplatteststoragecnt23167",
"https://xplatteststorage37742.blob.core.windows.net/xplatteststoragecnt34573"
]
}
},
Expand All @@ -40,7 +41,7 @@
{
"name": "test",
"subnet": {
"id": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourceGroups/xplatTstVmssGCreate1093/providers/Microsoft.Network/VirtualNetworks/xplattestvnet5583/subnets/xplattestsubnet7518"
"id": "/subscriptions/e33f361b-53c2-4cc7-b829-78906708387b/resourceGroups/xplatTstVmssGCreate9920/providers/Microsoft.Network/VirtualNetworks/xplattestvnet4131/subnets/xplattestsubnet6155"
},
"id": ""
}
Expand All @@ -60,7 +61,7 @@
"settings": {},
"protectedSettings": {},
"provisioningState": "",
"id": ""
"id": null
},
{
"name": "test1",
Expand All @@ -72,8 +73,9 @@
]
}
},
"overProvision": false,
"overprovision": false,
"singlePlacementGroup": null,
"id": null,
"name": "xplattestvmss5",
"location": "southeastasia"
"location": "eastus"
}
Loading

0 comments on commit e588c7f

Please sign in to comment.