@@ -234,7 +234,7 @@ func (s *subPathTestSuite) DefineTests(driver TestDriver, pattern testpatterns.T
234
234
TestBasicSubpath (f , f .Namespace .Name , l .pod )
235
235
})
236
236
237
- ginkgo .It ("should fail if subpath directory is outside the volume [Slow]" , func () {
237
+ ginkgo .It ("should fail if subpath directory is outside the volume [Slow][LinuxOnly] " , func () {
238
238
init ()
239
239
defer cleanup ()
240
240
@@ -272,7 +272,7 @@ func (s *subPathTestSuite) DefineTests(driver TestDriver, pattern testpatterns.T
272
272
testPodFailSubpath (f , l .pod , false )
273
273
})
274
274
275
- ginkgo .It ("should fail if subpath with backstepping is outside the volume [Slow]" , func () {
275
+ ginkgo .It ("should fail if subpath with backstepping is outside the volume [Slow][LinuxOnly] " , func () {
276
276
init ()
277
277
defer cleanup ()
278
278
@@ -443,6 +443,7 @@ func (s *subPathTestSuite) DefineTests(driver TestDriver, pattern testpatterns.T
443
443
// Change volume container to busybox so we can exec later
444
444
l .pod .Spec .Containers [1 ].Image = e2evolume .GetTestImage (imageutils .GetE2EImage (imageutils .BusyBox ))
445
445
l .pod .Spec .Containers [1 ].Command = e2evolume .GenerateScriptCmd ("sleep 100000" )
446
+ l .pod .Spec .Containers [1 ].Args = nil
446
447
447
448
ginkgo .By (fmt .Sprintf ("Creating pod %s" , l .pod .Name ))
448
449
removeUnusedContainers (l .pod )
@@ -618,8 +619,9 @@ func SubpathTestPod(f *framework.Framework, subpath, volumeType string, source *
618
619
}
619
620
620
621
func containerIsUnused (container * v1.Container ) bool {
621
- // mountImage with nil Args or with just "mounttest" as Args does nothing. Leave everything else
622
- return container .Image == mountImage && (container .Args == nil || (len (container .Args ) == 1 && container .Args [0 ] == "mounttest" ))
622
+ // mountImage with nil command and nil Args or with just "mounttest" as Args does nothing. Leave everything else
623
+ return container .Image == mountImage && container .Command == nil &&
624
+ (container .Args == nil || (len (container .Args ) == 1 && container .Args [0 ] == "mounttest" ))
623
625
}
624
626
625
627
// removeUnusedContainers removes containers from a SubpathTestPod that aren't
@@ -830,9 +832,10 @@ func testPodContainerRestartWithHooks(f *framework.Framework, pod *v1.Pod, hooks
830
832
831
833
pod .Spec .Containers [0 ].Image = e2evolume .GetTestImage (imageutils .GetE2EImage (imageutils .BusyBox ))
832
834
pod .Spec .Containers [0 ].Command = e2evolume .GenerateScriptCmd ("sleep 100000" )
835
+ pod .Spec .Containers [0 ].Args = nil
833
836
pod .Spec .Containers [1 ].Image = e2evolume .GetTestImage (imageutils .GetE2EImage (imageutils .BusyBox ))
834
837
pod .Spec .Containers [1 ].Command = e2evolume .GenerateScriptCmd ("sleep 100000" )
835
-
838
+ pod . Spec . Containers [ 1 ]. Args = nil
836
839
hooks .AddLivenessProbe (pod , probeFilePath )
837
840
838
841
// Start pod
@@ -1003,9 +1006,10 @@ func testSubpathReconstruction(f *framework.Framework, hostExec utils.HostExec,
1003
1006
// Change to busybox
1004
1007
pod .Spec .Containers [0 ].Image = e2evolume .GetTestImage (imageutils .GetE2EImage (imageutils .BusyBox ))
1005
1008
pod .Spec .Containers [0 ].Command = e2evolume .GenerateScriptCmd ("sleep 100000" )
1009
+ pod .Spec .Containers [0 ].Args = nil
1006
1010
pod .Spec .Containers [1 ].Image = e2evolume .GetTestImage (imageutils .GetE2EImage (imageutils .BusyBox ))
1007
1011
pod .Spec .Containers [1 ].Command = e2evolume .GenerateScriptCmd ("sleep 100000" )
1008
-
1012
+ pod . Spec . Containers [ 1 ]. Args = nil
1009
1013
// If grace period is too short, then there is not enough time for the volume
1010
1014
// manager to cleanup the volumes
1011
1015
gracePeriod := int64 (30 )
0 commit comments