Upgrade k8s package verison (#5358)
* upgrade k8s package version Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io> * Script upgrade and code formatting. Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io> Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io>
This commit is contained in:
14
vendor/helm.sh/helm/v3/pkg/kube/fake/fake.go
vendored
14
vendor/helm.sh/helm/v3/pkg/kube/fake/fake.go
vendored
@@ -40,6 +40,7 @@ type FailingKubeClient struct {
|
||||
BuildError error
|
||||
BuildUnstructuredError error
|
||||
WaitAndGetCompletedPodPhaseError error
|
||||
WaitDuration time.Duration
|
||||
}
|
||||
|
||||
// Create returns the configured error if set or prints
|
||||
@@ -50,8 +51,9 @@ func (f *FailingKubeClient) Create(resources kube.ResourceList) (*kube.Result, e
|
||||
return f.PrintingKubeClient.Create(resources)
|
||||
}
|
||||
|
||||
// Wait returns the configured error if set or prints
|
||||
// Waits the amount of time defined on f.WaitDuration, then returns the configured error if set or prints.
|
||||
func (f *FailingKubeClient) Wait(resources kube.ResourceList, d time.Duration) error {
|
||||
time.Sleep(f.WaitDuration)
|
||||
if f.WaitError != nil {
|
||||
return f.WaitError
|
||||
}
|
||||
@@ -63,7 +65,15 @@ func (f *FailingKubeClient) WaitWithJobs(resources kube.ResourceList, d time.Dur
|
||||
if f.WaitError != nil {
|
||||
return f.WaitError
|
||||
}
|
||||
return f.PrintingKubeClient.Wait(resources, d)
|
||||
return f.PrintingKubeClient.WaitWithJobs(resources, d)
|
||||
}
|
||||
|
||||
// WaitForDelete returns the configured error if set or prints
|
||||
func (f *FailingKubeClient) WaitForDelete(resources kube.ResourceList, d time.Duration) error {
|
||||
if f.WaitError != nil {
|
||||
return f.WaitError
|
||||
}
|
||||
return f.PrintingKubeClient.WaitForDelete(resources, d)
|
||||
}
|
||||
|
||||
// Delete returns the configured error if set or prints
|
||||
|
||||
Reference in New Issue
Block a user