Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
updated terra-functional-testing to support docker compose v2
Browse files Browse the repository at this point in the history
  • Loading branch information
sdadn committed Apr 3, 2024
1 parent 75630ad commit fad3234
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions packages/terra-functional-testing/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Changed
* Updated to support Docker Compose V2.

## 4.7.0 - (March 8, 2024)

* Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class SeleniumDockerService {

const envVars = this.seleniumVersion ? `TERRA_SELENIUM_DOCKER_VERSION=${this.seleniumVersion} ` : '';

await exec(`${envVars}docker-compose -f "${this.getDockerComposeFilePath()}" up -d`);
await exec(`${envVars}docker compose -f "${this.getDockerComposeFilePath()}" up -d`);
await this.waitForSeleniumHubReady();

logger.info('Successfully started the docker selenium hub.');
Expand Down Expand Up @@ -126,7 +126,7 @@ class SeleniumDockerService {
if (!this.keepAliveSeleniumDockerService && !this.disableSeleniumService) {
logger.info('Shutting down the docker selenium hub...');

await exec(`docker-compose -f "${this.getDockerComposeFilePath()}" down`);
await exec(`docker compose -f "${this.getDockerComposeFilePath()}" down`);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ describe('WDIO Selenium Docker Service', () => {

service.startSeleniumHub();

expect(mockExec).toHaveBeenCalledWith('docker-compose -f "mock-compose-path" up -d');
expect(mockExec).toHaveBeenCalledWith('docker compose -f "mock-compose-path" up -d');
});

it('should start the selenium hub with the specified version', () => {
Expand All @@ -154,7 +154,7 @@ describe('WDIO Selenium Docker Service', () => {

service.startSeleniumHub();

expect(mockExec).toHaveBeenCalledWith('TERRA_SELENIUM_DOCKER_VERSION=1234 docker-compose -f "mock-compose-path" up -d');
expect(mockExec).toHaveBeenCalledWith('TERRA_SELENIUM_DOCKER_VERSION=1234 docker compose -f "mock-compose-path" up -d');
});
});

Expand Down Expand Up @@ -225,7 +225,7 @@ describe('WDIO Selenium Docker Service', () => {

await service.onComplete();

expect(mockExec).toHaveBeenCalledWith('docker-compose -f "mock-compose-path" down');
expect(mockExec).toHaveBeenCalledWith('docker compose -f "mock-compose-path" down');
});
});
});

0 comments on commit fad3234

Please sign in to comment.