Skip to content

Commit 535f814

Browse files
[PyPiPublisherV0] Migrate PyPiPublisherV0 to Node20 (#19445)
* [PyPIPublisher] Migrate PyPIPublisher to Node20 - Added node10 and node16 handlers * [PyPIPublisher] Migrate PyPIPublisher to Node20 - Migrated to node 20 using build config generator * [PyPiPublisherV0] Migrate PyPiPublisherV0 to Node20 - Fix ci error
1 parent 6821278 commit 535f814

39 files changed

+2889
-84
lines changed

Tasks/PyPIPublisherV0/Tests/L0.ts

+4-6
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,25 @@ import * as path from 'path';
55
describe('PyPI Publisher', function () {
66
this.timeout(parseInt(process.env.TASK_TEST_TIMEOUT) || 8000);
77

8-
it('Test to verify pip command arguements', function(done: MochaDone) {
8+
it('Test to verify pip command arguements', async function() {
99
let tp = path.join(__dirname, 'L0PipCommands.js');
1010
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
1111

12-
tr.run();
12+
await tr.runAsync();
1313
//console.log(tr.stderr, tr.stdout);
1414
assert(tr.succeeded, 'task should have succeeded');
1515
assert(tr.stdOutContained('twine installed successfully'));
1616
assert(tr.stdOutContained('distribution files created successfully'));
1717
assert(tr.stdOutContained('distribution files uploaded successfully'));
18-
done();
1918
});
2019

21-
it('Test for Python tool execution failure ', function(done: MochaDone) {
20+
it('Test for Python tool execution failure ', async function() {
2221
let tp = path.join(__dirname, 'L0PythonExecFail.js');
2322
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
2423

25-
tr.run();
24+
await tr.runAsync();
2625
//console.log(tr.stderr, tr.stdout);
2726
assert(tr.failed, 'task should have failed');
2827
assert(tr.stdOutContained('twine installed failed'));
29-
done();
3028
});
3129
});

Tasks/PyPIPublisherV0/Tests/package-lock.json

+258-31
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tasks/PyPIPublisherV0/Tests/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"author": "Microsoft Corporation",
1010
"license": "MIT",
1111
"devDependencies": {
12-
"@types/mocha": "^5.2.0",
13-
"azure-pipelines-task-lib": "2.9.3"
12+
"@types/mocha": "^5.2.7",
13+
"azure-pipelines-task-lib": "^5.0.1-preview.0"
1414
}
1515
}

0 commit comments

Comments
 (0)