mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Fix integration tests.
This commit is contained in:
parent
41adcc5496
commit
440b4bc6ba
@ -49,21 +49,15 @@ func TestPersistentVolumeRecycler(t *testing.T) {
|
|||||||
deleteAllEtcdKeys()
|
deleteAllEtcdKeys()
|
||||||
// Use higher QPS and Burst, there is a test for race condition below, which
|
// Use higher QPS and Burst, there is a test for race condition below, which
|
||||||
// creates many claims and default values were too low.
|
// creates many claims and default values were too low.
|
||||||
binderClient := clientset.NewForConfigOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}, QPS: 1000, Burst: 100000})
|
|
||||||
recyclerClient := clientset.NewForConfigOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}, QPS: 1000, Burst: 100000})
|
|
||||||
testClient := clientset.NewForConfigOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}, QPS: 1000, Burst: 100000})
|
testClient := clientset.NewForConfigOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}, QPS: 1000, Burst: 100000})
|
||||||
host := volumetest.NewFakeVolumeHost("/tmp/fake", nil, nil)
|
host := volumetest.NewFakeVolumeHost("/tmp/fake", nil, nil)
|
||||||
|
|
||||||
plugins := []volume.VolumePlugin{&volumetest.FakeVolumePlugin{"plugin-name", host, volume.VolumeConfig{}, volume.VolumeOptions{}, 0, 0, nil, nil, nil, nil}}
|
plugins := []volume.VolumePlugin{&volumetest.FakeVolumePlugin{"plugin-name", host, volume.VolumeConfig{}, volume.VolumeOptions{}, 0, 0, nil, nil, nil, nil}}
|
||||||
cloud := &fake_cloud.FakeCloud{}
|
cloud := &fake_cloud.FakeCloud{}
|
||||||
|
|
||||||
binder := persistentvolumecontroller.NewPersistentVolumeClaimBinder(binderClient, 10*time.Second)
|
ctrl := persistentvolumecontroller.NewPersistentVolumeController(testClient, 10*time.Second, nil, plugins, cloud, "")
|
||||||
binder.Run()
|
ctrl.Run()
|
||||||
defer binder.Stop()
|
defer ctrl.Stop()
|
||||||
|
|
||||||
recycler, _ := persistentvolumecontroller.NewPersistentVolumeRecycler(recyclerClient, 30*time.Second, 3, plugins, cloud)
|
|
||||||
recycler.Run()
|
|
||||||
defer recycler.Stop()
|
|
||||||
|
|
||||||
// This PV will be claimed, released, and recycled.
|
// This PV will be claimed, released, and recycled.
|
||||||
pv := &api.PersistentVolume{
|
pv := &api.PersistentVolume{
|
||||||
|
Loading…
Reference in New Issue
Block a user