update names

Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
pull/13604/head
Austin Abro 9 months ago
parent 8ce1876192
commit c26b44f651
No known key found for this signature in database
GPG Key ID: 92EB5159E403F9D6

@ -371,7 +371,7 @@ func (cfg *Configuration) recordRelease(r *release.Release) {
// Init initializes the action configuration // Init initializes the action configuration
func (cfg *Configuration) Init(getter genericclioptions.RESTClientGetter, namespace, helmDriver string, log DebugLog) error { func (cfg *Configuration) Init(getter genericclioptions.RESTClientGetter, namespace, helmDriver string, log DebugLog) error {
kc, err := kube.New(getter, kube.StatusWaiter) kc, err := kube.New(getter, kube.StatusWaiterStrategy)
if err != nil { if err != nil {
return err return err
} }

@ -91,8 +91,8 @@ type Client struct {
type WaitStrategy int type WaitStrategy int
const ( const (
StatusWaiter WaitStrategy = iota StatusWaiterStrategy WaitStrategy = iota
LegacyWaiter LegacyWaiterStrategy
) )
func init() { func init() {
@ -121,13 +121,13 @@ func getStatusWatcher(factory Factory) (watcher.StatusWatcher, error) {
func NewWaiter(strategy WaitStrategy, factory Factory, log func(string, ...interface{})) (Waiter, error) { func NewWaiter(strategy WaitStrategy, factory Factory, log func(string, ...interface{})) (Waiter, error) {
switch strategy { switch strategy {
case LegacyWaiter: case LegacyWaiterStrategy:
kc, err := factory.KubernetesClientSet() kc, err := factory.KubernetesClientSet()
if err != nil { if err != nil {
return nil, err return nil, err
} }
return &HelmWaiter{kubeClient: kc, log: log}, nil return &HelmWaiter{kubeClient: kc, log: log}, nil
case StatusWaiter: case StatusWaiterStrategy:
sw, err := getStatusWatcher(factory) sw, err := getStatusWatcher(factory)
if err != nil { if err != nil {
return nil, err return nil, err

@ -513,7 +513,7 @@ func TestWait(t *testing.T) {
} }
}), }),
} }
waiter, err := NewWaiter(LegacyWaiter, c.Factory, c.Log) waiter, err := NewWaiter(LegacyWaiterStrategy, c.Factory, c.Log)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
@ -570,7 +570,7 @@ func TestWaitJob(t *testing.T) {
} }
}), }),
} }
waiter, err := NewWaiter(LegacyWaiter, c.Factory, c.Log) waiter, err := NewWaiter(LegacyWaiterStrategy, c.Factory, c.Log)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
@ -629,7 +629,7 @@ func TestWaitDelete(t *testing.T) {
} }
}), }),
} }
waiter, err := NewWaiter(LegacyWaiter, c.Factory, c.Log) waiter, err := NewWaiter(LegacyWaiterStrategy, c.Factory, c.Log)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
@ -660,7 +660,7 @@ func TestWaitDelete(t *testing.T) {
func TestReal(t *testing.T) { func TestReal(t *testing.T) {
t.Skip("This is a live test, comment this line to run") t.Skip("This is a live test, comment this line to run")
c, err := New(nil, StatusWaiter) c, err := New(nil, StatusWaiterStrategy)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
@ -673,7 +673,7 @@ func TestReal(t *testing.T) {
} }
testSvcEndpointManifest := testServiceManifest + "\n---\n" + testEndpointManifest testSvcEndpointManifest := testServiceManifest + "\n---\n" + testEndpointManifest
c, err = New(nil, StatusWaiter) c, err = New(nil, StatusWaiterStrategy)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }

Loading…
Cancel
Save