mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Removed clientset param from InjectContent
As one of previous changes added framework param to InjectContent, it does not need separate param for clientset any more.
This commit is contained in:
parent
ab8444d8d7
commit
b8c4b80e8d
@ -587,19 +587,19 @@ func TestVolumeClient(f *framework.Framework, config TestConfig, fsGroup *int64,
|
|||||||
// InjectContent inserts index.html with given content into given volume. It does so by
|
// InjectContent inserts index.html with given content into given volume. It does so by
|
||||||
// starting and auxiliary pod which writes the file there.
|
// starting and auxiliary pod which writes the file there.
|
||||||
// The volume must be writable.
|
// The volume must be writable.
|
||||||
func InjectContent(f *framework.Framework, client clientset.Interface, config TestConfig, fsGroup *int64, fsType string, tests []Test) {
|
func InjectContent(f *framework.Framework, config TestConfig, fsGroup *int64, fsType string, tests []Test) {
|
||||||
privileged := true
|
privileged := true
|
||||||
if framework.NodeOSDistroIs("windows") {
|
if framework.NodeOSDistroIs("windows") {
|
||||||
privileged = false
|
privileged = false
|
||||||
}
|
}
|
||||||
injectorPod, err := runVolumeTesterPod(client, config, "injector", privileged, fsGroup, tests)
|
injectorPod, err := runVolumeTesterPod(f.ClientSet, config, "injector", privileged, fsGroup, tests)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
framework.Failf("Failed to create injector pod: %v", err)
|
framework.Failf("Failed to create injector pod: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer func() {
|
defer func() {
|
||||||
e2epod.DeletePodOrFail(client, injectorPod.Namespace, injectorPod.Name)
|
e2epod.DeletePodOrFail(f.ClientSet, injectorPod.Namespace, injectorPod.Name)
|
||||||
e2epod.WaitForPodToDisappear(client, injectorPod.Namespace, injectorPod.Name, labels.Everything(), framework.Poll, framework.PodDeleteTimeout)
|
e2epod.WaitForPodToDisappear(f.ClientSet, injectorPod.Namespace, injectorPod.Name, labels.Everything(), framework.Poll, framework.PodDeleteTimeout)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
ginkgo.By("Writing text file contents in the container.")
|
ginkgo.By("Writing text file contents in the container.")
|
||||||
|
@ -178,7 +178,7 @@ func (t *volumesTestSuite) defineTests(driver TestDriver, pattern testpatterns.T
|
|||||||
// local), plugin skips setting fsGroup if volume is already mounted
|
// local), plugin skips setting fsGroup if volume is already mounted
|
||||||
// and we don't have reliable way to detect volumes are unmounted or
|
// and we don't have reliable way to detect volumes are unmounted or
|
||||||
// not before starting the second pod.
|
// not before starting the second pod.
|
||||||
volume.InjectContent(f, f.ClientSet, config, fsGroup, pattern.FsType, tests)
|
volume.InjectContent(f, config, fsGroup, pattern.FsType, tests)
|
||||||
if driver.GetDriverInfo().Capabilities[CapPersistence] {
|
if driver.GetDriverInfo().Capabilities[CapPersistence] {
|
||||||
volume.TestVolumeClient(f, config, fsGroup, pattern.FsType, tests)
|
volume.TestVolumeClient(f, config, fsGroup, pattern.FsType, tests)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user