Skip to content
Merged
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
7 changes: 7 additions & 0 deletions test/windows/WSLCTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3670,6 +3670,7 @@ class WSLCTests

WSLC_TEST_METHOD(NamedVolumesVhdSessionRecovery)
{

WSLCDriverOption driverOpts[] = {{"SizeBytes", "1073741824"}};
ValidateNamedVolumeRecoveryContract("vhd", driverOpts, ARRAYSIZE(driverOpts));

Expand All @@ -3678,6 +3679,12 @@ class WSLCTests
const std::string volumeName = "wslc-test-named-volume-vhd";
const std::string containerName = "wslc-test-container-vhd";

// Prune containers on exit so this test doesn't leak "wslc-test-container-vhd" on exit.
auto cleanup = wil::scope_exit_log(WI_DIAGNOSTICS_INFO, [&]() {
PruneResult result;
LOG_IF_FAILED(m_defaultSession->PruneContainers(nullptr, 0, 0, &result.result));
});

WSLCVolumeOptions volumeOptions{};
volumeOptions.Name = volumeName.c_str();
volumeOptions.Driver = "vhd";
Expand Down