Skip to content

Commit

Permalink
Fix workdir test failing on CircleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
Steveb-p committed Jul 13, 2019
1 parent 5b83c70 commit cd10088
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,18 @@ describe('starts containers properly with --build and --timeout options', () =>

test('ensure container command executed with --workdir command option', async () => {
await compose.down({ cwd: path.join(__dirname), log: logOutput, config: 'docker-compose-42.yml' });
await compose.run('some-service', 'cat hello.txt', {
const result = await compose.run('some-service', 'pwd', {
cwd: path.join(__dirname),
log: true,
config: 'docker-compose-42.yml',
composeOptions: [ '--verbose' ],
commandOptions: [ '--workdir', '/mountedvolume/nested/dir' ]

// Alpine has "/" as default
commandOptions: [ '--workdir', '/home/root' ]
});

expect(result.out).toBe('/home/root\n');

await compose.down({ cwd: path.join(__dirname), log: logOutput, config: 'docker-compose-42.yml' });
});

Expand Down

0 comments on commit cd10088

Please sign in to comment.