-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Azure App Service V3 folder and make Azure PowerShell V3 GA #7633
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,14 +16,13 @@ | |
"author": "Microsoft Corporation", | ||
"version": { | ||
"Major": 3, | ||
"Minor": 0, | ||
"Patch": 5 | ||
"Minor": 1, | ||
"Patch": 0 | ||
}, | ||
"releaseNotes": "This is an early preview. Added support for Fail on standard error and ErrorActionPreference", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please change the releaseNotes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @RoopeshNair to provide Release Notes |
||
"demands": [ | ||
"azureps" | ||
], | ||
"preview": true, | ||
"groups": [ | ||
{ | ||
"name": "AzurePowerShellVersionOptions", | ||
|
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
import * as path from 'path'; | ||
import * as assert from 'assert'; | ||
import * as ttm from 'vsts-task-lib/mock-test'; | ||
import tl = require('vsts-task-lib'); | ||
var ltx = require('ltx'); | ||
import fs = require('fs'); | ||
|
||
var AppServiceTests = require("../node_modules/azure-arm-rest/Tests/L0-azure-arm-app-service.js"); | ||
var KuduServiceTests = require("../node_modules/azure-arm-rest/Tests/L0-azure-arm-app-service-kudu-tests.js"); | ||
var ApplicationInsightsTests = require("../node_modules/azure-arm-rest/Tests/L0-azure-arm-appinsights-tests.js"); | ||
|
||
|
||
describe('AzureRmWebAppDeployment Suite', function() { | ||
|
||
this.timeout(60000); | ||
|
||
before((done) => { | ||
if(!tl.exist(path.join(__dirname, '..', 'node_modules/azure-arm-rest/Tests/node_modules'))) { | ||
tl.cp(path.join( __dirname, 'node_modules'), path.join(__dirname, '..', 'node_modules/azure-arm-rest/Tests'), '-rf', true); | ||
} | ||
|
||
tl.cp(path.join(__dirname, "..", "node_modules", "webdeployment-common", "Tests", 'L1XmlVarSub', 'Web.config'), path.join(__dirname, "..", "node_modules", "webdeployment-common", "Tests", 'L1XmlVarSub', 'Web_test.config'), '-f', false); | ||
tl.cp(path.join(__dirname, "..", "node_modules", "webdeployment-common", "Tests", 'L1XmlVarSub', 'Web.Debug.config'), path.join(__dirname, "..", "node_modules", "webdeployment-common", "Tests", 'L1XmlVarSub', 'Web_test.Debug.config'), '-f', false); | ||
tl.cp(path.join(__dirname, "..", "node_modules", "webdeployment-common", "Tests", 'L1XmlVarSub', 'parameters.xml'), path.join(__dirname, "..", "node_modules", "webdeployment-common", "Tests", 'L1XmlVarSub', 'parameters_test.xml'), '-f', false); | ||
tl.cp(path.join(__dirname, "..", "node_modules","webdeployment-common","Tests", 'L1XdtTransform', 'Web.config'), path.join(__dirname, "..", "node_modules","webdeployment-common","Tests", 'L1XdtTransform', 'Web_test.config'), '-f', false); | ||
done(); | ||
}); | ||
after(function() { | ||
try { | ||
tl.rmRF(path.join(__dirname, "..", "node_modules", "webdeployment-common", "Tests", 'L1XmlVarSub', 'parameters_test.xml')); | ||
} | ||
catch(error) { | ||
tl.debug(error); | ||
} | ||
}); | ||
|
||
ApplicationInsightsTests.ApplicationInsightsTests(); | ||
AppServiceTests.AzureAppServiceMockTests(); | ||
KuduServiceTests.KuduServiceTests(); | ||
|
||
if (tl.osType().match(/^Win/)) { | ||
it('Runs successfully with XML Transformation (L1)', (done:MochaDone) => { | ||
this.timeout(parseInt(process.env.TASK_TEST_TIMEOUT) || 20000); | ||
|
||
let tp = path.join(__dirname, "..", "node_modules","webdeployment-common","Tests","L1XdtTransform.js"); | ||
let tr : ttm.MockTestRunner = new ttm.MockTestRunner(tp); | ||
tr.run(); | ||
|
||
var resultFile = ltx.parse(fs.readFileSync(path.join(__dirname, "..", "node_modules","webdeployment-common","Tests", 'L1XdtTransform', 'Web_test.config'))); | ||
var expectFile = ltx.parse(fs.readFileSync(path.join(__dirname, "..", "node_modules","webdeployment-common","Tests", 'L1XdtTransform','Web_Expected.config'))); | ||
assert(ltx.equal(resultFile, expectFile) , 'Should Transform attributes on Web.config'); | ||
done(); | ||
}); | ||
} | ||
else { | ||
|
||
} | ||
|
||
it('Runs successfully with XML variable substitution', (done:MochaDone) => { | ||
let tp = path.join(__dirname, "..", "node_modules", "webdeployment-common", "Tests", 'L1XmlVarSub.js'); | ||
let tr : ttm.MockTestRunner = new ttm.MockTestRunner(tp); | ||
tr.run(); | ||
|
||
var resultFile = ltx.parse(fs.readFileSync(path.join(__dirname, "..", "node_modules","webdeployment-common","Tests", 'L1XmlVarSub', 'Web_test.config'))); | ||
var expectFile = ltx.parse(fs.readFileSync(path.join(__dirname, "..", "node_modules","webdeployment-common","Tests", 'L1XmlVarSub', 'Web_Expected.config'))); | ||
assert(ltx.equal(resultFile, expectFile) , 'Should have substituted variables in Web.config file'); | ||
var resultFile = ltx.parse(fs.readFileSync(path.join(__dirname, "..", "node_modules", "webdeployment-common", "Tests", 'L1XmlVarSub', 'Web_test.Debug.config'))); | ||
var expectFile = ltx.parse(fs.readFileSync(path.join(__dirname, "..", "node_modules", "webdeployment-common", "Tests", 'L1XmlVarSub', 'Web_Expected.Debug.config'))); | ||
assert(ltx.equal(resultFile, expectFile) , 'Should have substituted variables in Web.Debug.config file'); | ||
var resultParamFile = ltx.parse(fs.readFileSync(path.join(__dirname, "..", "node_modules","webdeployment-common","Tests", 'L1XmlVarSub', 'parameters_test.xml'))); | ||
var expectParamFile = ltx.parse(fs.readFileSync(path.join(__dirname, "..", "node_modules","webdeployment-common","Tests", 'L1XmlVarSub', 'parameters_Expected.xml'))); | ||
assert(ltx.equal(resultParamFile, expectParamFile) , 'Should have substituted variables in parameters.xml file'); | ||
|
||
done(); | ||
}); | ||
|
||
it('Runs successfully with JSON variable substitution', (done:MochaDone) => { | ||
let tp = path.join(__dirname, "..", "node_modules", "webdeployment-common", "Tests", 'L1JsonVarSub.js'); | ||
let tr : ttm.MockTestRunner = new ttm.MockTestRunner(tp); | ||
tr.run(); | ||
|
||
assert(tr.stdout.search('JSON - eliminating object variables validated') > 0, 'JSON - eliminating object variables validation error'); | ||
assert(tr.stdout.search('JSON - simple string change validated') > 0,'JSON -simple string change validation error' ); | ||
assert(tr.stdout.search('JSON - system variable elimination validated') > 0, 'JSON -system variable elimination validation error'); | ||
assert(tr.stdout.search('JSON - special variables validated') > 0, 'JSON - special variables validation error'); | ||
assert(tr.stdout.search('JSON - variables with dot character validated') > 0, 'JSON variables with dot character validation error'); | ||
assert(tr.stdout.search('JSON - substitute inbuilt JSON attributes validated') > 0, 'JSON inbuilt variable substitution validation error'); | ||
assert(tr.stdout.search('VALID JSON COMMENTS TESTS PASSED') > 0, 'VALID JSON COMMENTS TESTS PASSED'); | ||
assert(tr.stdout.search('INVALID JSON COMMENTS TESTS PASSED') > 0, 'INVALID JSON COMMENTS TESTS PASSED'); | ||
assert(tr.succeeded, 'task should have succeeded'); | ||
done(); | ||
}); | ||
|
||
it('Validate File Encoding', (done:MochaDone) => { | ||
let tp = path.join(__dirname, "..", "node_modules", "webdeployment-common", "Tests", 'L1ValidateFileEncoding.js'); | ||
let tr : ttm.MockTestRunner = new ttm.MockTestRunner(tp); | ||
tr.run(); | ||
|
||
assert(tr.stdout.search('UTF-8 with BOM validated') >= 0, 'Should have validated UTF-8 with BOM'); | ||
assert(tr.stdout.search('UTF-16LE with BOM validated') >= 0, 'Should have validated UTF-16LE with BOM'); | ||
assert(tr.stdout.search('UTF-16BE with BOM validated') >= 0, 'Should have validated UTF-16BE with BOM'); | ||
assert(tr.stdout.search('UTF-32LE with BOM validated') >= 0, 'Should have validated UTF-32LE with BOM'); | ||
assert(tr.stdout.search('UTF-32BE with BOM validated') >= 0, 'Should have validated UTF-32BE with BOM'); | ||
|
||
assert(tr.stdout.search('UTF-8 without BOM validated') >= 0, 'Should have validated UTF-8 without BOM'); | ||
assert(tr.stdout.search('UTF-16LE without BOM validated') >= 0, 'Should have validated UTF-16LE without BOM'); | ||
assert(tr.stdout.search('UTF-16BE without BOM validated') >= 0, 'Should have validated UTF-16BE without BOM'); | ||
assert(tr.stdout.search('UTF-32LE without BOM validated') >= 0, 'Should have validated UTF-32LE without BOM'); | ||
assert(tr.stdout.search('UTF-32BE without BOM validated') >= 0, 'Should have validated UTF-32BE without BOM'); | ||
|
||
assert(tr.stdout.search('Short File Buffer Error') >= 0, 'Should have validated short Buffer'); | ||
assert(tr.stdout.search('Unknown encoding type') >= 0, 'Should throw for Unknown File Buffer'); | ||
done(); | ||
}); | ||
|
||
it('Validate webdeployment-common.utility.copyDirectory()', (done:MochaDone) => { | ||
let tp = path.join(__dirname, "..", "node_modules", "webdeployment-common", "Tests", 'L0CopyDirectory.js'); | ||
let tr : ttm.MockTestRunner = new ttm.MockTestRunner(tp); | ||
tr.run(); | ||
|
||
assert(tr.stdout.search('## Copy Files Successful ##') >=0, 'should have copied the files'); | ||
assert(tr.stdout.search('## mkdir Successful ##') >= 0, 'should have created dir including dest folder'); | ||
done(); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any Build or Release templates that uses this task and now needs to point to latest version?