Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extensive end-to-end tests of IContainersClient #250

Open
wants to merge 27 commits into
base: bmw/zod
Choose a base branch
from

Conversation

bwateratmsft
Copy link
Contributor

Fixes #76

@bwateratmsft bwateratmsft requested a review from a team as a code owner March 6, 2025 16:06
@bwateratmsft bwateratmsft changed the title Add extensive end-to-end tests of containers client Add extensive end-to-end tests of IContainersClient Mar 6, 2025
@bwateratmsft bwateratmsft linked an issue Mar 6, 2025 that may be closed by this pull request
3 tasks
@bwateratmsft bwateratmsft mentioned this pull request Mar 6, 2025
3 tasks
@bwateratmsft bwateratmsft requested a review from Copilot March 6, 2025 18:35

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR adds extensive end-to-end tests for IContainersClient and includes minor improvements in the Docker client behavior and documentation.

  • Added support for a '--time' argument in the restart containers command.
  • Clarified the time parameter documentation in ContainerClient contracts.
  • Updated test descriptions to differentiate between unit and integration tests.

Reviewed Changes

File Description
packages/vscode-container-client/src/clients/DockerClientBase/DockerClientBase.ts Added handling for the '--time' flag during container restart.
packages/vscode-container-client/src/contracts/ContainerClient.ts Updated doc comments to specify that time values are in seconds.
packages/vscode-container-client/src/test/normalizeContainerState.test.ts Renamed describe block to include '(unit)'.
packages/vscode-container-client/src/test/DockerComposeClient.test.ts Updated describe blocks for clearer unit and integration test separation.
packages/vscode-container-client/src/test/DockerClient.test.ts Renamed describe block to include '(unit)'.
packages/vscode-container-client/src/test/parseDockerRawPortString.test.ts Renamed describe block to include '(unit)'.
packages/vscode-container-client/src/test/wslifyPath.test.ts Renamed describe block to include '(unit)'.
packages/vscode-container-client/src/test/tryParseSize.test.ts Renamed describe block to include '(unit)'.
packages/vscode-container-client/src/test/parseDockerLikeImageName.test.ts Renamed describe block to include '(unit)'.
packages/vscode-container-client/src/test/commandLineBuilder.test.ts Renamed describe block to include '(unit)'.

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

Comment on lines +28 to +32
const runInWsl: boolean = false; // Set to true if running in WSL

// Supply to run the login/logout tests
const dockerHubUsername = '';
const dockerHubPAT = ''; // Never commit this value!!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I am also wondering if env vars would be better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add some E2E tests
2 participants