Skip to content

Commit 97c6f70

Browse files
committed
update registryCompatibilityOCI.test.ts
1 parent 7f6d4ae commit 97c6f70

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

src/test/container-features/registryCompatibilityOCI.test.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,18 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import { assert } from 'chai';
7-
import * as path from 'path';
8-
import { devContainerDown, devContainerUp, shellExec } from '../testUtils';
7+
import { devContainerDown, devContainerUp, shellExec, setupCLI } from '../testUtils';
98

109
const pkg = require('../../../package.json');
1110

1211
describe('Registry Compatibility', function () {
1312
this.timeout('120s');
1413

15-
const tmp = path.relative(process.cwd(), path.join(__dirname, 'tmp'));
16-
const cli = `npx --prefix ${tmp} devcontainer`;
1714

18-
before('Install', async () => {
19-
await shellExec(`rm -rf ${tmp}/node_modules`);
20-
await shellExec(`mkdir -p ${tmp}`);
21-
await shellExec(`npm --prefix ${tmp} install devcontainers-cli-${pkg.version}.tgz`);
22-
});
15+
const { cli, installCLI, uninstallCLI } = setupCLI(pkg.version);
16+
17+
before('Install', installCLI);
18+
after('Install', uninstallCLI);
2319

2420
// TODO: Matrix this test against all tested registries
2521
describe('Azure Container Registry', () => {

0 commit comments

Comments
 (0)