Skip to content

Improve wlsc cli e2e test coverage#40753

Open
chemwolf6922 wants to merge 4 commits into
masterfrom
user/chemwolf6922/improve-wslc-e2e-test-coverage
Open

Improve wlsc cli e2e test coverage#40753
chemwolf6922 wants to merge 4 commits into
masterfrom
user/chemwolf6922/improve-wslc-e2e-test-coverage

Conversation

@chemwolf6922

@chemwolf6922 chemwolf6922 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary of the Pull Request

Improve wslc cli e2e test coverage. (Helps podman evaluation. )
Untested commands / options after this:

command / option comment
--session repeat & not implemented
container <create | run> --gpus requires NV gpu
container <create | run> --publish-all require EXPOSE in docker file
container start -i not implemented
image list --verbose not implemented
network create -o options are driver specific
settings opens text editor

PR Checklist

  • Closes: Link to issue #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

WSLCE2ETests::WSLCE2EContainerCreateTests::WSLCE2E_Container_Create_Cpus
WSLCE2ETests::WSLCE2EContainerCreateTests::WSLCE2E_Container_Create_Cpus_Invalid
WSLCE2ETests::WSLCE2EContainerCreateTests::WSLCE2E_Container_Create_Memory
WSLCE2ETests::WSLCE2EContainerCreateTests::WSLCE2E_Container_Create_Memory_Invalid
WSLCE2ETests::WSLCE2EContainerCreateTests::WSLCE2E_Container_Create_Ulimit
WSLCE2ETests::WSLCE2EContainerCreateTests::WSLCE2E_Container_Create_Ulimit_Invalid
WSLCE2ETests::WSLCE2EContainerCreateTests::WSLCE2E_Container_Create_Entrypoint
WSLCE2ETests::WSLCE2EContainerCreateTests::WSLCE2E_Container_Create_EnvFile
WSLCE2ETests::WSLCE2EContainerCreateTests::WSLCE2E_Container_Create_EnvFile_MissingFile
WSLCE2ETests::WSLCE2EContainerCreateTests::WSLCE2E_Container_Create_EnvFile_InvalidContent
WSLCE2ETests::WSLCE2EContainerCreateTests::WSLCE2E_Container_Create_Publish_TCP
WSLCE2ETests::WSLCE2EContainerCreateTests::WSLCE2E_Container_Create_Publish_MultipleMappings
WSLCE2ETests::WSLCE2EContainerCreateTests::WSLCE2E_Container_Create_Publish_Ephemeral
WSLCE2ETests::WSLCE2EContainerCreateTests::WSLCE2E_Container_Create_PortUdp_NotSupported
WSLCE2ETests::WSLCE2EContainerCreateTests::WSLCE2E_Container_Create_PortHostIP_NotSupported
WSLCE2ETests::WSLCE2EContainerExecTests::WSLCE2E_Container_Exec_Detach
WSLCE2ETests::WSLCE2EContainerLogsTests::WSLCE2E_Container_Logs_Follow
WSLCE2ETests::WSLCE2EGlobalTests::WSLCE2E_Session_List_Verbose
WSLCE2ETests::WSLCE2EImageBuildTests::WSLCE2E_Image_Build_NoCache_Success
WSLCE2ETests::WSLCE2EImageDeleteTests::WSLCE2E_Image_DeleteNoPrune
WSLCE2ETests::WSLCE2EImageListTests::WSLCE2E_Image_List_NoTrunc_ShowsFullImageId
WSLCE2ETests::WSLCE2ESettingsTests::WSLCE2E_Settings_Reset_RewritesFile

@chemwolf6922 chemwolf6922 requested a review from a team as a code owner June 9, 2026 08:45
Copilot AI review requested due to automatic review settings June 9, 2026 08:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR expands the Windows WSLC end-to-end (TAEF) CLI test suite to cover additional previously-untested commands/options, improving confidence for container workflow evaluation (including Podman scenarios).

Changes:

  • Added multiple new WSLC CLI E2E tests covering settings reset, session list/shell/terminate, image list no-trunc, image build no-cache, image delete --no-prune, container logs --follow, container exec --detach, and several container create flags.
  • Introduced a new HostFileChange RAII helper in the Windows test harness to safely back up and restore host files modified by tests.
  • Extended test cleanup to ensure newly-created images/tags are removed to keep the E2E environment stable across runs.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
test/windows/wslc/e2e/WSLCE2ESettingsTests.cpp Adds E2E coverage for wslc settings reset with host settings file mutation protection.
test/windows/wslc/e2e/WSLCE2ESessionEnterTests.cpp Adds E2E coverage for system session list --verbose, system session shell, and named system session terminate.
test/windows/wslc/e2e/WSLCE2EImageListTests.cpp Adds E2E coverage for image list --no-trunc validating full image ID rendering.
test/windows/wslc/e2e/WSLCE2EImageDeleteTests.cpp Implements image delete --no-prune E2E by tagging an alias and validating tag removal behavior.
test/windows/wslc/e2e/WSLCE2EImageBuildTests.cpp Adds E2E coverage for build --no-cache behavior via non-deterministic layer generation.
test/windows/wslc/e2e/WSLCE2EContainerLogsTests.cpp Adds E2E coverage for container logs -f streaming behavior.
test/windows/wslc/e2e/WSLCE2EContainerExecTests.cpp Adds E2E coverage for container exec -d (detach) behavior.
test/windows/wslc/e2e/WSLCE2EContainerCreateTests.cpp Adds E2E coverage for create flags: --cpus, --memory, --ulimit, --entrypoint, --env-file, and -p.
test/windows/Common.h Declares HostFileChange RAII utility for safely modifying host-side files in tests.
test/windows/Common.cpp Implements HostFileChange backup/restore/update behavior used by new settings tests.

Comment thread test/windows/Common.cpp Outdated
Comment thread test/windows/Common.cpp Outdated
Comment thread test/windows/Common.cpp Outdated
Comment thread test/windows/wslc/e2e/WSLCE2EContainerExecTests.cpp Outdated
Comment thread test/windows/wslc/e2e/WSLCE2EContainerCreateTests.cpp Outdated
Comment thread test/windows/wslc/e2e/WSLCE2EContainerCreateTests.cpp
Comment thread test/windows/wslc/e2e/WSLCE2EContainerCreateTests.cpp Outdated

@dkbennett dkbennett left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's some test redundancy here. We didn't have an explicit Session List test before, though it is used in validation, so that's fine to have the verbose validation but doing interactive session enter to validate the list output seems unnecessary.

The session targeting and terminate targeting tests are redundant and our existing tests cover that as well as elevation related scenarios

The settings test looks good, we didn't have one of those before.

@AmelBawa-msft should verify the Container tests match things in plan for validating that.

Comment thread test/windows/wslc/e2e/WSLCE2EContainerExecTests.cpp Outdated
Comment thread test/windows/wslc/e2e/WSLCE2ESessionEnterTests.cpp Outdated
Comment thread test/windows/wslc/e2e/WSLCE2ESessionEnterTests.cpp Outdated
Comment thread test/windows/wslc/e2e/WSLCE2ESessionEnterTests.cpp Outdated
Comment thread test/windows/wslc/e2e/WSLCE2ESessionEnterTests.cpp Outdated
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.

4 participants