Skip to content

Commit 11c8852

Browse files
committed
update ubuntu image
1 parent 2915809 commit 11c8852

File tree

3 files changed

+7
-18
lines changed

3 files changed

+7
-18
lines changed

azure-pipelines.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ jobs:
2828
#################################################
2929
displayName: Linux
3030
pool:
31-
vmImage: ubuntu-18.04
31+
vmImage: ubuntu-22.04
3232

33-
steps:
33+
steps:
3434
- template: azure-pipelines-steps-node.yml
3535
parameters:
3636
nodeVersion: $(nodeVersion)
@@ -57,7 +57,7 @@ jobs:
5757
#################################################
5858
displayName: macOS
5959
pool:
60-
vmImage: macOS-10.15
60+
vmImage: macOS-12
6161

6262
steps:
6363
- template: azure-pipelines-steps-node.yml

node/test/dirtests.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,21 +1388,9 @@ describe('Dir Operation Tests', function () {
13881388

13891389
var fd = fs.openSync(filePath, 'r');
13901390

1391-
var worked = false;
1392-
try {
1393-
tl.rmRF(testPath);
1394-
worked = true;
1395-
}
1396-
catch (err) { }
1391+
tl.rmRF(testPath);
13971392

1398-
if (os.platform() === 'win32') {
1399-
assert(!worked, 'should not work on windows');
1400-
assert(shell.test('-e', testPath), 'directory still exists');
1401-
}
1402-
else {
1403-
assert(worked, 'should work on nix');
1404-
assert(!shell.test('-e', testPath), 'directory removed');
1405-
}
1393+
assert(!shell.test('-e', testPath), 'directory removed');
14061394

14071395
fs.closeSync(fd);
14081396
tl.rmRF(testPath);

node/test/toolrunnertests.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ describe('Toolrunner Tests', function () {
190190
ls.exec(_testExecOptions)
191191
.then(function (code) {
192192
var contents = stdStream.getContents();
193-
assert(contents.indexOf('exec tool: /bin/ls') >= 0, 'should exec ls');
193+
const usr = os.platform() === 'linux' ? '/usr' : '';
194+
assert(contents.indexOf(`exec tool: ${usr}/bin/ls`) >= 0, 'should exec ls');
194195
assert.equal(code, 0, 'return code of ls should be 0');
195196
done();
196197
})

0 commit comments

Comments
 (0)