Skip to content

Commit a8d1efc

Browse files
committed
Fix failing tests
1 parent 5eb0c09 commit a8d1efc

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Tests/ContainerNetworkTools.Tests.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,8 @@ Describe "ContainerNetworkTools.psm1" {
104104
}
105105
Should -Invoke Install-RequiredFeature -ModuleName 'ContainerNetworkTools' -ParameterFilter {
106106
$Feature -eq "WinCNIPlugin" -and
107-
$InstallPath -eq "$Env:ProgramFiles\Containerd\cni\bin" -and
108-
$SourceFile -eq "$Script:TestDownloadPath" -and
109-
$EnvPath -eq $null -and
107+
$InstallPath -eq 'TestDrive:\WinCNI\bin' -and
108+
$SourceFile -eq $MockDownloadFilePath -and
110109
$cleanup -eq $true -and
111110
$UpdateEnvPath -eq $false
112111
}

containers-toolkit/Private/CommonToolUtilities.psm1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,8 @@ function Install-RequiredFeature {
689689
[string[]] $SourceFile,
690690
[string] $EnvPath,
691691
[boolean] $cleanup,
692+
693+
# Use by WinCNI plugin to avoid updating the environment path
692694
[boolean] $UpdateEnvPath = $true
693695
)
694696
# Create the directory to untar to

containers-toolkit/Public/ContainerNetworkTools.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function Install-WinCNIPlugin {
4949
}
5050
$WinCNIPath = $WinCNIPath -replace '(\\bin)$', ''
5151

52-
# Check if Containerd is alread installed
52+
# Check if WinCNI plugins are installed
5353
$isInstalled = -not (Test-EmptyDirectory -Path $WinCNIPath)
5454

5555
$plugin = "Windows CNI plugins"

0 commit comments

Comments
 (0)