Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Tasks/TwineAuthenticateV0/Tests/L0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('TwineAuthenticateV1 Suite', function () {
after(() => {
});

it('Does a basic hello world test', function(done: MochaDone) {
it('Does a basic hello world test', function(done: Mocha.Done) {
// TODO - add real tests
done();
});
Expand Down
556 changes: 505 additions & 51 deletions Tasks/TwineAuthenticateV0/package-lock.json

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions Tasks/TwineAuthenticateV0/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,16 @@
},
"homepage": "https://github.com/Microsoft/azure-pipelines-tasks#readme",
"dependencies": {
"azure-pipelines-task-lib": "2.8.0",
"ini": "1.3.5",
"@types/mocha": "^5.2.7",
"@types/node": "^10.17.0",
"@types/uuid": "^8.3.0",
"azure-pipelines-task-lib": "^3.1.7",
"ini": "^1.3.6",
"packaging-common": "file:../../_build/Tasks/Common/packaging-common-1.0.1.tgz",
"typed-rest-client": "^0.11.0",
"utility-common": "file:../../_build/Tasks/Common/utility-common-1.0.2.tgz"
},
"devDependencies": {
"typescript": "4.0.2"
}
}
8 changes: 4 additions & 4 deletions Tasks/TwineAuthenticateV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
"category": "Package",
"version": {
"Major": 0,
"Minor": 206,
"Minor": 207,
"Patch": 0
},
"runsOn": [
"Agent",
"DeploymentGroup"
],
"minimumAgentVersion": "2.115.0",
"minimumAgentVersion": "2.144.0",
"instanceNameFormat": "Twine Authenticate $(message)",
"groups": [
{
Expand Down Expand Up @@ -81,7 +81,7 @@
}
],
"execution": {
"Node": {
"Node10": {
"target": "twineauthenticatemain.js",
"argumentFormat": ""
}
Expand All @@ -106,7 +106,7 @@
"Warning_SessionCreationFailed": "Could not create provenance session: %s"
},
"postjobexecution": {
"Node": {
"Node10": {
"target": "authcleanup.js",
"argumentFormat": ""
}
Expand Down
8 changes: 4 additions & 4 deletions Tasks/TwineAuthenticateV0/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"category": "Package",
"version": {
"Major": 0,
"Minor": 206,
"Minor": 207,
"Patch": 0
},
"runsOn": ["Agent", "DeploymentGroup"],
"minimumAgentVersion": "2.115.0",
"minimumAgentVersion": "2.144.0",
"instanceNameFormat": "ms-resource:loc.instanceNameFormat",
"groups": [
{
Expand Down Expand Up @@ -74,7 +74,7 @@
}
],
"execution": {
"Node": {
"Node10": {
"target": "twineauthenticatemain.js",
"argumentFormat": ""
}
Expand All @@ -99,7 +99,7 @@
"Warning_SessionCreationFailed": "ms-resource:loc.messages.Warning_SessionCreationFailed"
},
"postjobexecution": {
"Node": {
"Node10": {
"target": "authcleanup.js",
"argumentFormat": ""
}
Expand Down
14 changes: 7 additions & 7 deletions Tasks/TwineAuthenticateV1/Tests/L0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,28 @@ describe('Twine Authenticate V1 Suite', function () {
tl.rmRF(tempDir);
});

it('sets authentication for current organization feed', (done: MochaDone) => {
this.timeout(1000);
it('sets authentication for current organization feed', function (done: Mocha.Done) {
this.timeout(5000);
let tp = path.join(__dirname, './setAuthInternalFeed.js')
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);

tr.run();
assert(tr.invokedToolCount == 0, 'no tool should be invoked.');
assert(tr.succeeded, 'should have succeeded');
assert.equal(tr.errorIssues.length, 0, "should have no errors");
assert.strictEqual(tr.errorIssues.length, 0, "should have no errors");
let fileContent = ini.parse(fs.readFileSync(tempDir + path.sep + ".pypirc", "utf-8"));

assert.equal(fileContent["distutils"]["index-servers"], "TestFeed", "Test Feed should be added to auth list.");
assert.strictEqual(fileContent["distutils"]["index-servers"], "TestFeed", "Test Feed should be added to auth list.");

assert.equal(fileContent["TestFeed"]["repository"],
assert.strictEqual(fileContent["TestFeed"]["repository"],
"https://vsts/packagesource/TestFeed",
"Test Feed repository should be correct.");

assert.equal(fileContent["TestFeed"]["username"],
assert.strictEqual(fileContent["TestFeed"]["username"],
"build",
"Default username should be correct.");

assert.equal(fileContent["TestFeed"]["password"],
assert.strictEqual(fileContent["TestFeed"]["password"],
"token",
"Default password from environment variable should be correct.");

Expand Down
Loading