Skip to content

Commit

Permalink
Uncommenting L0 tests; were commented earlier by mistake (#3731)
Browse files Browse the repository at this point in the history
* Unconnenting L0 tests

* Few changes for L0 tests
  • Loading branch information
tejasd1990 authored Mar 14, 2017
1 parent c166482 commit 7de6420
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 10 deletions.
2 changes: 2 additions & 0 deletions Tasks/AzureResourceGroupDeployment/Tests/EnablePrereq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ tr.setInput("csmParametersFile", path.join(__dirname, "CSM.json"));
process.env["ENDPOINT_AUTH_AzureRM"] = "{\"parameters\":{\"serviceprincipalid\":\"id\",\"serviceprincipalkey\":\"key\",\"tenantid\":\"tenant\"},\"scheme\":\"ServicePrincipal\"}";
process.env["ENDPOINT_DATA_AzureRM_SUBSCRIPTIONID"] = "sId";
process.env["ENDPOINT_DATA_AzureRM_SUBSCRIPTIONNAME"] = "sName";
process.env["ENDPOINT_URL_AzureRM"] = "https://management.azure.com/";
process.env["ENDPOINT_DATA_AzureRM_ENVIRONMENTAUTHORITYURL"] = "https://login.windows.net/";

tr.registerMock('vsts-task-lib/toolrunner', require('vsts-task-lib/mock-toolrunner'));
tr.registerMock('./azure-rest/azure-arm-compute', require('./mock_node_modules/azure-arm-compute'));
Expand Down
6 changes: 3 additions & 3 deletions Tasks/AzureResourceGroupDeployment/Tests/L0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ describe('Azure Resource Group Deployment', function () {
done(error);
}
});
/*it('Successfully triggered createOrUpdate deployment', (done) => {
it('Successfully triggered createOrUpdate deployment', (done) => {
let tp = path.join(__dirname, 'createOrUpdate.js');
process.env["csmFile"] = "CSM.json";
process.env["csmParametersFile"] = "CSM.json";
Expand Down Expand Up @@ -558,7 +558,7 @@ describe('Azure Resource Group Deployment', function () {
assert(tr.stdout.indexOf("Enabling winrm for virtual machine") > 0, "Should add Custom Script Extension to the virual machine");
assert(tr.stdout.indexOf("virtualMachineExtensions.get is called on vm customVM") > 0, "Should try getting the extension on the virtual machine");
assert(tr.stdout.indexOf("virtualMachineExtensions.createOrUpdate is called") > 0, "Should call createOrUpdate of virtual Machine extensions");
assert(tr.stdout.indexOf("Addition of extension completed for vmcustomVM") > 0, "Should be able to add the extension");
assert(tr.stdout.indexOf("Addition of extension completed for vm: customVM") > 0, "Should be able to add the extension");
assert(tr.stdout.indexOf("Provisioning of CustomScriptExtension on vm customVM is in Succeeded State") > 0, "Provisioning of the Custom Script Extension should be in succeeded state");
assert(tr.stdout.indexOf("Trying to add a network security group rule") <= 0, "Shouldn't try adding NSG rule");
done();
Expand Down Expand Up @@ -975,5 +975,5 @@ describe('Azure Resource Group Deployment', function () {
console.log("STDOUT", tr.stdout);
done(error);
}
});*/
});
});
2 changes: 2 additions & 0 deletions Tasks/AzureResourceGroupDeployment/Tests/VMOperations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ tr.setInput("resourceGroupName", "dummy");
process.env[ "ENDPOINT_AUTH_AzureRM"] = "{\"parameters\":{\"serviceprincipalid\":\"id\",\"serviceprincipalkey\":\"key\",\"tenantid\":\"tenant\"},\"scheme\":\"ServicePrincipal\"}";
process.env["ENDPOINT_DATA_AzureRM_SUBSCRIPTIONID"] = "sId";
process.env["ENDPOINT_DATA_AzureRM_SUBSCRIPTIONNAME"] = "sName";
process.env["ENDPOINT_URL_AzureRM"] = "https://management.azure.com/";
process.env["ENDPOINT_DATA_AzureRM_ENVIRONMENTAUTHORITYURL"] = "https://login.windows.net/";

tr.registerMock('vsts-task-lib/toolrunner', require('vsts-task-lib/mock-toolrunner'));
tr.registerMock('./azure-rest/azure-arm-compute', require('./mock_node_modules/azure-arm-compute'));
Expand Down
2 changes: 2 additions & 0 deletions Tasks/AzureResourceGroupDeployment/Tests/createOrUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ tr.setInput("csmParametersFile", path.join(__dirname, process.env["csmParameters
process.env[ "ENDPOINT_AUTH_AzureRM"] = "{\"parameters\":{\"serviceprincipalid\":\"id\",\"serviceprincipalkey\":\"key\",\"tenantid\":\"tenant\"},\"scheme\":\"ServicePrincipal\"}";
process.env["ENDPOINT_DATA_AzureRM_SUBSCRIPTIONID"] = "sId";
process.env["ENDPOINT_DATA_AzureRM_SUBSCRIPTIONNAME"] = "sName";
process.env["ENDPOINT_URL_AzureRM"] = "https://management.azure.com/";
process.env["ENDPOINT_DATA_AzureRM_ENVIRONMENTAUTHORITYURL"] = "https://login.windows.net/";

tr.registerMock('vsts-task-lib/toolrunner', require('vsts-task-lib/mock-toolrunner'));
tr.registerMock('./azure-rest/azure-arm-resource', require('./mock_node_modules/azure-arm-resource'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ tr.setInput("resourceGroupName", "dummy");
process.env[ "ENDPOINT_AUTH_AzureRM"] = "{\"parameters\":{\"serviceprincipalid\":\"id\",\"serviceprincipalkey\":\"key\",\"tenantid\":\"tenant\"},\"scheme\":\"ServicePrincipal\"}";
process.env["ENDPOINT_DATA_AzureRM_SUBSCRIPTIONID"] = "sId";
process.env["ENDPOINT_DATA_AzureRM_SUBSCRIPTIONNAME"] = "sName";
process.env["ENDPOINT_URL_AzureRM"] = "https://management.azure.com/";
process.env["ENDPOINT_DATA_AzureRM_ENVIRONMENTAUTHORITYURL"] = "https://login.windows.net/";

tr.registerMock('vsts-task-lib/toolrunner', require('vsts-task-lib/mock-toolrunner'));
tr.registerMock('./azure-rest/azure-arm-resource', require('./mock_node_modules/azure-arm-resource'));
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ tr.setInput("enableDeploymentPrerequisites", "None");
process.env[ "ENDPOINT_AUTH_AzureRM"] = "{\"parameters\":{\"serviceprincipalid\":\"id\",\"serviceprincipalkey\":\"key\",\"tenantid\":\"tenant\"},\"scheme\":\"ServicePrincipal\"}";
process.env["ENDPOINT_DATA_AzureRM_SUBSCRIPTIONID"] = "sId";
process.env["ENDPOINT_DATA_AzureRM_SUBSCRIPTIONNAME"] = "sName";
process.env["ENDPOINT_URL_AzureRM"] = "https://management.azure.com/";
process.env["ENDPOINT_DATA_AzureRM_ENVIRONMENTAUTHORITYURL"] = "https://login.windows.net/";

tr.registerMock('vsts-task-lib/toolrunner', require('vsts-task-lib/mock-toolrunner'));
tr.registerMock('./azure-rest/azure-arm-resource', require('./mock_node_modules/azure-arm-resource'));
Expand Down

0 comments on commit 7de6420

Please sign in to comment.