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

[terra-functional-testing] update docker compose to v2 #857

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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');
});
});
});
Loading