Skip to content

Commit eac6dd4

Browse files
authored
update ubuntu image (#925)
1 parent f7e1795 commit eac6dd4

File tree

3 files changed

+11
-23
lines changed

3 files changed

+11
-23
lines changed

azure-pipelines.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
#################################################
1515
displayName: windows
1616
pool:
17-
vmImage: windows-2019
17+
vmImage: windows-2022
1818

1919
steps:
2020
- template: azure-pipelines-steps-node.yml
@@ -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: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,33 +1381,20 @@ describe('Dir Operation Tests', function () {
13811381
tl.mkdirP(testPath);
13821382
assert(shell.test('-d', testPath), 'directory created');
13831383

1384-
// can't remove folder with locked file on windows
1384+
// starting from windows-2022,
1385+
// can remove folder with locked file on windows as well,
1386+
// using the command `rd /s /q <path>`
13851387
var filePath = path.join(testPath, 'file.txt');
13861388
fs.appendFileSync(filePath, 'some data');
13871389
assert(shell.test('-e', filePath), 'file exists');
13881390

13891391
var fd = fs.openSync(filePath, 'r');
13901392

1391-
var worked = false;
1392-
try {
1393-
tl.rmRF(testPath);
1394-
worked = true;
1395-
}
1396-
catch (err) { }
1397-
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-
}
1406-
1407-
fs.closeSync(fd);
14081393
tl.rmRF(testPath);
14091394
assert(!shell.test('-e', testPath), 'directory removed');
14101395

1396+
fs.closeSync(fd);
1397+
14111398
done();
14121399
});
14131400

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)