Skip to content

Commit 40f5914

Browse files
chrmartiCopilot
andcommitted
Use lightweight Feature in Podman tests
Keep Podman coverage focused on CLI Feature support without depending on Docker-in-Docker package installation under hosted-runner storage constraints. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent d53bff6 commit 40f5914

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

‎src/test/cli.podman.test.ts‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ describe('Dev Containers CLI using Podman', function () {
1414

1515
const tmp = path.relative(process.cwd(), path.join(__dirname, 'tmp'));
1616
const cli = `npx --prefix ${tmp} devcontainer`;
17+
const additionalFeatures = JSON.stringify({
18+
'ghcr.io/devcontainers/feature-starter/hello:1': {
19+
greeting: 'howdy',
20+
},
21+
});
1722

1823
before('Install', async () => {
1924
await shellExec(`rm -rf ${tmp}/node_modules`);
@@ -23,17 +28,17 @@ describe('Dev Containers CLI using Podman', function () {
2328

2429
describe('Command up using Podman', () => {
2530

26-
it('should execute successfully with valid config with features', async () => {
27-
const res = await shellExec(`${cli} up --docker-path podman --workspace-folder ${__dirname}/configs/image-with-features`);
31+
it('should execute successfully with valid image config and features', async () => {
32+
const res = await shellExec(`${cli} up --docker-path podman --workspace-folder ${__dirname}/configs/image --additional-features '${additionalFeatures}'`);
2833
const response = JSON.parse(res.stdout);
2934
assert.equal(response.outcome, 'success');
3035
const containerId: string = response.containerId;
3136
assert.ok(containerId, 'Container id not found.');
3237
await shellExec(`podman rm -f ${containerId}`);
3338
});
3439

35-
it('should execute successfully with valid config with features', async () => {
36-
const res = await shellExec(`${cli} up --docker-path podman --workspace-folder ${__dirname}/configs/dockerfile-with-features`);
40+
it('should execute successfully with valid Dockerfile config and features', async () => {
41+
const res = await shellExec(`${cli} up --docker-path podman --workspace-folder ${__dirname}/configs/dockerfile-without-features --additional-features '${additionalFeatures}'`);
3742
const response = JSON.parse(res.stdout);
3843
assert.equal(response.outcome, 'success');
3944
const containerId: string = response.containerId;

0 commit comments

Comments
 (0)