mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +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
|
||||
// starting and auxiliary pod which writes the file there.
|
||||
// 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
|
||||
if framework.NodeOSDistroIs("windows") {
|
||||
privileged = false
|
||||
}
|
||||
injectorPod, err := runVolumeTesterPod(client, config, "injector", privileged, fsGroup, tests)
|
||||
injectorPod, err := runVolumeTesterPod(f.ClientSet, config, "injector", privileged, fsGroup, tests)
|
||||
if err != nil {
|
||||
framework.Failf("Failed to create injector pod: %v", err)
|
||||
return
|
||||
}
|
||||
defer func() {
|
||||
e2epod.DeletePodOrFail(client, injectorPod.Namespace, injectorPod.Name)
|
||||
e2epod.WaitForPodToDisappear(client, injectorPod.Namespace, injectorPod.Name, labels.Everything(), framework.Poll, framework.PodDeleteTimeout)
|
||||
e2epod.DeletePodOrFail(f.ClientSet, injectorPod.Namespace, injectorPod.Name)
|
||||
e2epod.WaitForPodToDisappear(f.ClientSet, injectorPod.Namespace, injectorPod.Name, labels.Everything(), framework.Poll, framework.PodDeleteTimeout)
|
||||
}()
|
||||
|
||||
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
|
||||
// and we don't have reliable way to detect volumes are unmounted or
|
||||
// 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] {
|
||||
volume.TestVolumeClient(f, config, fsGroup, pattern.FsType, tests)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user