Repository: helm/helm
Pull request #13400 (2024-10-21 07:32:51)

chore: fix some function names in comment
<!--  Thanks for sending a pull request!  Here are some tips for you:
1. Make sure to read the Contributing Guide before submitting your PR: https://github.com/helm/helm/blob/main/CONTRIBUTING.md
2. If this PR closes another issue, add 'closes #<issue number>' somewhere in the PR summary. GitHub will automatically close that issue when this PR gets merged. Alternatively, adding 'refs #<issue number>' will not close the issue, but help provide the reviewer more context.-->

**What this PR does / why we need it**:

fix some function names in comment

**Special notes for your reviewer**:

**If applicable**:
- [ ] this PR contains user facing changes (the `docs needed` label should be applied if so)
- [ ] this PR contains unit tests
- [ ] this PR has been tested for backwards compatibility



Patch:
diff --git a/Makefile b/Makefile
index 2a264916a..b4bdf34a4 100644
--- a/Makefile
+++ b/Makefile
@@ -78,7 +78,7 @@ all: build
 build: $(BINDIR)/$(BINNAME)
 
 $(BINDIR)/$(BINNAME): $(SRC)
-	CGO_ENABLED=$(CGO_ENABLED) go build $(GOFLAGS) -trimpath -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o '$(BINDIR)'/$(BINNAME) ./cmd/helm
+	GO111MODULE=on CGO_ENABLED=$(CGO_ENABLED) go build $(GOFLAGS) -trimpath -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o '$(BINDIR)'/$(BINNAME) ./cmd/helm
 
 # ------------------------------------------------------------------------------
 #  install
@@ -104,15 +104,15 @@ test: test-unit
 test-unit:
 	@echo
 	@echo "==> Running unit tests <=="
-	go test $(GOFLAGS) -run $(TESTS) $(PKG) $(TESTFLAGS)
+	GO111MODULE=on go test $(GOFLAGS) -run $(TESTS) $(PKG) $(TESTFLAGS)
 	@echo
 	@echo "==> Running unit test(s) with ldflags <=="
 # Test to check the deprecation warnings on Kubernetes templates created by `helm create` against the current Kubernetes
 # version. Note: The version details are set in var LDFLAGS. To avoid the ldflags impact on other unit tests that are
 # based on older versions, this is run separately. When run without the ldflags in the unit test (above) or coverage
 # test, it still passes with a false-positive result as the resources shouldn’t be deprecated in the older Kubernetes
-# version if it only starts failing with the latest.
-	go test $(GOFLAGS) -run ^TestHelmCreateChart_CheckDeprecatedWarnings$$ ./pkg/lint/ $(TESTFLAGS) -ldflags '$(LDFLAGS)'
+# version if it only starts failing with the latest. 
+	GO111MODULE=on go test $(GOFLAGS) -run ^TestHelmCreateChart_CheckDeprecatedWarnings$$ ./pkg/lint/ $(TESTFLAGS) -ldflags '$(LDFLAGS)'
 
 
 .PHONY: test-coverage
@@ -151,7 +151,7 @@ coverage:
 
 .PHONY: format
 format: $(GOIMPORTS)
-	go list -f '{{.Dir}}' ./... | xargs $(GOIMPORTS) -w -local helm.sh/helm
+	GO111MODULE=on go list -f '{{.Dir}}' ./... | xargs $(GOIMPORTS) -w -local helm.sh/helm
 
 # Generate golden files used in unit tests
 .PHONY: gen-test-golden
@@ -168,10 +168,10 @@ gen-test-golden: test-unit
 # without a go.mod file when downloading the following dependencies
 
 $(GOX):
-	(cd /; go install github.com/mitchellh/gox@v1.0.2-0.20220701044238-9f712387e2d2)
+	(cd /; GO111MODULE=on go install github.com/mitchellh/gox@v1.0.2-0.20220701044238-9f712387e2d2)
 
 $(GOIMPORTS):
-	(cd /; go install golang.org/x/tools/cmd/goimports@latest)
+	(cd /; GO111MODULE=on go install golang.org/x/tools/cmd/goimports@latest)
 
 # ------------------------------------------------------------------------------
 #  release
@@ -179,7 +179,7 @@ $(GOIMPORTS):
 .PHONY: build-cross
 build-cross: LDFLAGS += -extldflags "-static"
 build-cross: $(GOX)
-	GOFLAGS="-trimpath" CGO_ENABLED=0 $(GOX) -parallel=3 -output="_dist/{{.OS}}-{{.Arch}}/$(BINNAME)" -osarch='$(TARGETS)' $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' ./cmd/helm
+	GOFLAGS="-trimpath" GO111MODULE=on CGO_ENABLED=0 $(GOX) -parallel=3 -output="_dist/{{.OS}}-{{.Arch}}/$(BINNAME)" -osarch='$(TARGETS)' $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' ./cmd/helm
 
 .PHONY: dist
 dist:
diff --git a/pkg/action/push.go b/pkg/action/push.go
index 68d2ba42d..70e5c1582 100644
--- a/pkg/action/push.go
+++ b/pkg/action/push.go
@@ -73,7 +73,7 @@ func WithPlainHTTP(plainHTTP bool) PushOpt {
 	}
 }
 
-// WithOptWriter sets the registryOut field on the push configuration object.
+// WithPushOptWriter sets the registryOut field on the push configuration object.
 func WithPushOptWriter(out io.Writer) PushOpt {
 	return func(p *Push) {
 		p.out = out


Test patch:
diff --git a/pkg/chartutil/validate_name_test.go b/pkg/chartutil/validate_name_test.go
index 5f0792f94..09dec9fbb 100644
--- a/pkg/chartutil/validate_name_test.go
+++ b/pkg/chartutil/validate_name_test.go
@@ -18,7 +18,7 @@ package chartutil
 
 import "testing"
 
-// TestValidateName is a regression test for ValidateName
+// TestValidateReleaseName is a regression test for ValidateName
 //
 // Kubernetes has strict naming conventions for resource names. This test represents
 // those conventions.
diff --git a/pkg/kube/ready_test.go b/pkg/kube/ready_test.go
index 14bf8588b..d4983ba75 100644
--- a/pkg/kube/ready_test.go
+++ b/pkg/kube/ready_test.go
@@ -20,718 +20,16 @@ import (
 	"testing"
 
 	appsv1 "k8s.io/api/apps/v1"
-	appsv1beta1 "k8s.io/api/apps/v1beta1"
 	batchv1 "k8s.io/api/batch/v1"
 	corev1 "k8s.io/api/core/v1"
-	extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
-	apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
-	apiextv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/runtime"
 	"k8s.io/apimachinery/pkg/util/intstr"
-	"k8s.io/cli-runtime/pkg/resource"
-	"k8s.io/client-go/kubernetes"
 	"k8s.io/client-go/kubernetes/fake"
 )
 
 const defaultNamespace = metav1.NamespaceDefault
 
-func Test_ReadyChecker_IsReady_Pod(t *testing.T) {
-	type fields struct {
-		client        kubernetes.Interface
-		log           func(string, ...interface{})
-		checkJobs     bool
-		pausedAsReady bool
-	}
-	type args struct {
-		ctx      context.Context
-		resource *resource.Info
-	}
-	tests := []struct {
-		name    string
-		fields  fields
-		args    args
-		pod     *corev1.Pod
-		want    bool
-		wantErr bool
-	}{
-		{
-			name: "IsReady Pod",
-			fields: fields{
-				client:        fake.NewSimpleClientset(),
-				log:           func(string, ...interface{}) {},
-				checkJobs:     true,
-				pausedAsReady: false,
-			},
-			args: args{
-				ctx:      context.TODO(),
-				resource: &resource.Info{Object: &corev1.Pod{}, Name: "foo", Namespace: defaultNamespace},
-			},
-			pod:     newPodWithCondition("foo", corev1.ConditionTrue),
-			want:    true,
-			wantErr: false,
-		},
-		{
-			name: "IsReady Pod returns error",
-			fields: fields{
-				client:        fake.NewSimpleClientset(),
-				log:           func(string, ...interface{}) {},
-				checkJobs:     true,
-				pausedAsReady: false,
-			},
-			args: args{
-				ctx:      context.TODO(),
-				resource: &resource.Info{Object: &corev1.Pod{}, Name: "foo", Namespace: defaultNamespace},
-			},
-			pod:     newPodWithCondition("bar", corev1.ConditionTrue),
-			want:    false,
-			wantErr: true,
-		},
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			c := &ReadyChecker{
-				client:        tt.fields.client,
-				log:           tt.fields.log,
-				checkJobs:     tt.fields.checkJobs,
-				pausedAsReady: tt.fields.pausedAsReady,
-			}
-			if _, err := c.client.CoreV1().Pods(defaultNamespace).Create(context.TODO(), tt.pod, metav1.CreateOptions{}); err != nil {
-				t.Errorf("Failed to create Pod error: %v", err)
-				return
-			}
-			got, err := c.IsReady(tt.args.ctx, tt.args.resource)
-			if (err != nil) != tt.wantErr {
-				t.Errorf("IsReady() error = %v, wantErr %v", err, tt.wantErr)
-				return
-			}
-			if got != tt.want {
-				t.Errorf("IsReady() = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
-
-func Test_ReadyChecker_IsReady_Job(t *testing.T) {
-	type fields struct {
-		client        kubernetes.Interface
-		log           func(string, ...interface{})
-		checkJobs     bool
-		pausedAsReady bool
-	}
-	type args struct {
-		ctx      context.Context
-		resource *resource.Info
-	}
-	tests := []struct {
-		name    string
-		fields  fields
-		args    args
-		job     *batchv1.Job
-		want    bool
-		wantErr bool
-	}{
-		{
-			name: "IsReady Job error while getting job",
-			fields: fields{
-				client:        fake.NewSimpleClientset(),
-				log:           func(string, ...interface{}) {},
-				checkJobs:     true,
-				pausedAsReady: false,
-			},
-			args: args{
-				ctx:      context.TODO(),
-				resource: &resource.Info{Object: &batchv1.Job{}, Name: "foo", Namespace: defaultNamespace},
-			},
-			job:     newJob("bar", 1, intToInt32(1), 1, 0),
-			want:    false,
-			wantErr: true,
-		},
-		{
-			name: "IsReady Job",
-			fields: fields{
-				client:        fake.NewSimpleClientset(),
-				log:           func(string, ...interface{}) {},
-				checkJobs:     true,
-				pausedAsReady: false,
-			},
-			args: args{
-				ctx:      context.TODO(),
-				resource: &resource.Info{Object: &batchv1.Job{}, Name: "foo", Namespace: defaultNamespace},
-			},
-			job:     newJob("foo", 1, intToInt32(1), 1, 0),
-			want:    true,
-			wantErr: false,
-		},
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			c := &ReadyChecker{
-				client:        tt.fields.client,
-				log:           tt.fields.log,
-				checkJobs:     tt.fields.checkJobs,
-				pausedAsReady: tt.fields.pausedAsReady,
-			}
-			if _, err := c.client.BatchV1().Jobs(defaultNamespace).Create(context.TODO(), tt.job, metav1.CreateOptions{}); err != nil {
-				t.Errorf("Failed to create Job error: %v", err)
-				return
-			}
-			got, err := c.IsReady(tt.args.ctx, tt.args.resource)
-			if (err != nil) != tt.wantErr {
-				t.Errorf("IsReady() error = %v, wantErr %v", err, tt.wantErr)
-			}
-			if got != tt.want {
-				t.Errorf("IsReady() = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
-
-func Test_ReadyChecker_IsReady_Deployment(t *testing.T) {
-	type fields struct {
-		client        kubernetes.Interface
-		log           func(string, ...interface{})
-		checkJobs     bool
-		pausedAsReady bool
-	}
-	type args struct {
-		ctx      context.Context
-		resource *resource.Info
-	}
-	tests := []struct {
-		name       string
-		fields     fields
-		args       args
-		replicaSet *appsv1.ReplicaSet
-		deployment *appsv1.Deployment
-		want       bool
-		wantErr    bool
-	}{
-		{
-			name: "IsReady Deployments error while getting current Deployment",
-			fields: fields{
-				client:        fake.NewSimpleClientset(),
-				log:           func(string, ...interface{}) {},
-				checkJobs:     true,
-				pausedAsReady: false,
-			},
-			args: args{
-				ctx:      context.TODO(),
-				resource: &resource.Info{Object: &appsv1.Deployment{}, Name: "foo", Namespace: defaultNamespace},
-			},
-			replicaSet: newReplicaSet("foo", 0, 0, true),
-			deployment: newDeployment("bar", 1, 1, 0, true),
-			want:       false,
-			wantErr:    true,
-		},
-		{
-			name: "IsReady Deployments", //TODO fix this one
-			fields: fields{
-				client:        fake.NewSimpleClientset(),
-				log:           func(string, ...interface{}) {},
-				checkJobs:     true,
-				pausedAsReady: false,
-			},
-			args: args{
-				ctx:      context.TODO(),
-				resource: &resource.Info{Object: &appsv1.Deployment{}, Name: "foo", Namespace: defaultNamespace},
-			},
-			replicaSet: newReplicaSet("foo", 0, 0, true),
-			deployment: newDeployment("foo", 1, 1, 0, true),
-			want:       false,
-			wantErr:    false,
-		},
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			c := &ReadyChecker{
-				client:        tt.fields.client,
-				log:           tt.fields.log,
-				checkJobs:     tt.fields.checkJobs,
-				pausedAsReady: tt.fields.pausedAsReady,
-			}
-			if _, err := c.client.AppsV1().Deployments(defaultNamespace).Create(context.TODO(), tt.deployment, metav1.CreateOptions{}); err != nil {
-				t.Errorf("Failed to create Deployment error: %v", err)
-				return
-			}
-			if _, err := c.client.AppsV1().ReplicaSets(defaultNamespace).Create(context.TODO(), tt.replicaSet, metav1.CreateOptions{}); err != nil {
-				t.Errorf("Failed to create ReplicaSet error: %v", err)
-				return
-			}
-			got, err := c.IsReady(tt.args.ctx, tt.args.resource)
-			if (err != nil) != tt.wantErr {
-				t.Errorf("IsReady() error = %v, wantErr %v", err, tt.wantErr)
-			}
-			if got != tt.want {
-				t.Errorf("IsReady() = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
-
-func Test_ReadyChecker_IsReady_PersistentVolumeClaim(t *testing.T) {
-	type fields struct {
-		client        kubernetes.Interface
-		log           func(string, ...interface{})
-		checkJobs     bool
-		pausedAsReady bool
-	}
-	type args struct {
-		ctx      context.Context
-		resource *resource.Info
-	}
-	tests := []struct {
-		name    string
-		fields  fields
-		args    args
-		pvc     *corev1.PersistentVolumeClaim
-		want    bool
-		wantErr bool
-	}{
-		{
-			name: "IsReady PersistentVolumeClaim",
-			fields: fields{
-				client:        fake.NewSimpleClientset(),
-				log:           func(string, ...interface{}) {},
-				checkJobs:     true,
-				pausedAsReady: false,
-			},
-			args: args{
-				ctx:      context.TODO(),
-				resource: &resource.Info{Object: &corev1.PersistentVolumeClaim{}, Name: "foo", Namespace: defaultNamespace},
-			},
-			pvc:     newPersistentVolumeClaim("foo", corev1.ClaimPending),
-			want:    false,
-			wantErr: false,
-		},
-		{
-			name: "IsReady PersistentVolumeClaim with error",
-			fields: fields{
-				client:        fake.NewSimpleClientset(),
-				log:           func(string, ...interface{}) {},
-				checkJobs:     true,
-				pausedAsReady: false,
-			},
-			args: args{
-				ctx:      context.TODO(),
-				resource: &resource.Info{Object: &corev1.PersistentVolumeClaim{}, Name: "foo", Namespace: defaultNamespace},
-			},
-			pvc:     newPersistentVolumeClaim("bar", corev1.ClaimPending),
-			want:    false,
-			wantErr: true,
-		},
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			c := &ReadyChecker{
-				client:        tt.fields.client,
-				log:           tt.fields.log,
-				checkJobs:     tt.fields.checkJobs,
-				pausedAsReady: tt.fields.pausedAsReady,
-			}
-			if _, err := c.client.CoreV1().PersistentVolumeClaims(defaultNamespace).Create(context.TODO(), tt.pvc, metav1.CreateOptions{}); err != nil {
-				t.Errorf("Failed to create PersistentVolumeClaim error: %v", err)
-				return
-			}
-			got, err := c.IsReady(tt.args.ctx, tt.args.resource)
-			if (err != nil) != tt.wantErr {
-				t.Errorf("IsReady() error = %v, wantErr %v", err, tt.wantErr)
-			}
-			if got != tt.want {
-				t.Errorf("IsReady() = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
-
-func Test_ReadyChecker_IsReady_Service(t *testing.T) {
-	type fields struct {
-		client        kubernetes.Interface
-		log           func(string, ...interface{})
-		checkJobs     bool
-		pausedAsReady bool
-	}
-	type args struct {
-		ctx      context.Context
-		resource *resource.Info
-	}
-	tests := []struct {
-		name    string
-		fields  fields
-		args    args
-		svc     *corev1.Service
-		want    bool
-		wantErr bool
-	}{
-		{
-			name: "IsReady Service",
-			fields: fields{
-				client:        fake.NewSimpleClientset(),
-				log:           func(string, ...interface{}) {},
-				checkJobs:     true,
-				pausedAsReady: false,
-			},
-			args: args{
-				ctx:      context.TODO(),
-				resource: &resource.Info{Object: &corev1.Service{}, Name: "foo", Namespace: defaultNamespace},
-			},
-			svc:     newService("foo", corev1.ServiceSpec{Type: corev1.ServiceTypeLoadBalancer, ClusterIP: ""}),
-			want:    false,
-			wantErr: false,
-		},
-		{
-			name: "IsReady Service with error",
-			fields: fields{
-				client:        fake.NewSimpleClientset(),
-				log:           func(string, ...interface{}) {},
-				checkJobs:     true,
-				pausedAsReady: false,
-			},
-			args: args{
-				ctx:      context.TODO(),
-				resource: &resource.Info{Object: &corev1.Service{}, Name: "foo", Namespace: defaultNamespace},
-			},
-			svc:     newService("bar", corev1.ServiceSpec{Type: corev1.ServiceTypeExternalName, ClusterIP: ""}),
-			want:    false,
-			wantErr: true,
-		},
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			c := &ReadyChecker{
-				client:        tt.fields.client,
-				log:           tt.fields.log,
-				checkJobs:     tt.fields.checkJobs,
-				pausedAsReady: tt.fields.pausedAsReady,
-			}
-			if _, err := c.client.CoreV1().Services(defaultNamespace).Create(context.TODO(), tt.svc, metav1.CreateOptions{}); err != nil {
-				t.Errorf("Failed to create Service error: %v", err)
-				return
-			}
-			got, err := c.IsReady(tt.args.ctx, tt.args.resource)
-			if (err != nil) != tt.wantErr {
-				t.Errorf("IsReady() error = %v, wantErr %v", err, tt.wantErr)
-			}
-			if got != tt.want {
-				t.Errorf("IsReady() = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
-
-func Test_ReadyChecker_IsReady_DaemonSet(t *testing.T) {
-	type fields struct {
-		client        kubernetes.Interface
-		log           func(string, ...interface{})
-		checkJobs     bool
-		pausedAsReady bool
-	}
-	type args struct {
-		ctx      context.Context
-		resource *resource.Info
-	}
-	tests := []struct {
-		name    string
-		fields  fields
-		args    args
-		ds      *appsv1.DaemonSet
-		want    bool
-		wantErr bool
-	}{
-		{
-			name: "IsReady DaemonSet",
-			fields: fields{
-				client:        fake.NewSimpleClientset(),
-				log:           func(string, ...interface{}) {},
-				checkJobs:     true,
-				pausedAsReady: false,
-			},
-			args: args{
-				ctx:      context.TODO(),
-				resource: &resource.Info{Object: &appsv1.DaemonSet{}, Name: "foo", Namespace: defaultNamespace},
-			},
-			ds:      newDaemonSet("foo", 0, 0, 1, 0, true),
-			want:    false,
-			wantErr: false,
-		},
-		{
-			name: "IsReady DaemonSet with error",
-			fields: fields{
-				client:        fake.NewSimpleClientset(),
-				log:           func(string, ...interface{}) {},
-				checkJobs:     true,
-				pausedAsReady: false,
-			},
-			args: args{
-				ctx:      context.TODO(),
-				resource: &resource.Info{Object: &appsv1.DaemonSet{}, Name: "foo", Namespace: defaultNamespace},
-			},
-			ds:      newDaemonSet("bar", 0, 1, 1, 1, true),
-			want:    false,
-			wantErr: true,
-		},
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			c := &ReadyChecker{
-				client:        tt.fields.client,
-				log:           tt.fields.log,
-				checkJobs:     tt.fields.checkJobs,
-				pausedAsReady: tt.fields.pausedAsReady,
-			}
-			if _, err := c.client.AppsV1().DaemonSets(defaultNamespace).Create(context.TODO(), tt.ds, metav1.CreateOptions{}); err != nil {
-				t.Errorf("Failed to create DaemonSet error: %v", err)
-				return
-			}
-			got, err := c.IsReady(tt.args.ctx, tt.args.resource)
-			if (err != nil) != tt.wantErr {
-				t.Errorf("IsReady() error = %v, wantErr %v", err, tt.wantErr)
-			}
-			if got != tt.want {
-				t.Errorf("IsReady() = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
-
-func Test_ReadyChecker_IsReady_StatefulSet(t *testing.T) {
-	type fields struct {
-		client        kubernetes.Interface
-		log           func(string, ...interface{})
-		checkJobs     bool
-		pausedAsReady bool
-	}
-	type args struct {
-		ctx      context.Context
-		resource *resource.Info
-	}
-	tests := []struct {
-		name    string
-		fields  fields
-		args    args
-		ss      *appsv1.StatefulSet
-		want    bool
-		wantErr bool
-	}{
-		{
-			name: "IsReady StatefulSet",
-			fields: fields{
-				client:        fake.NewSimpleClientset(),
-				log:           func(string, ...interface{}) {},
-				checkJobs:     true,
-				pausedAsReady: false,
-			},
-			args: args{
-				ctx:      context.TODO(),
-				resource: &resource.Info{Object: &appsv1beta1.StatefulSet{}, Name: "foo", Namespace: defaultNamespace},
-			},
-			ss:      newStatefulSet("foo", 1, 0, 0, 1, true),
-			want:    false,
-			wantErr: false,
-		},
-		{
-			name: "IsReady StatefulSet with error",
-			fields: fields{
-				client:        fake.NewSimpleClientset(),
-				log:           func(string, ...interface{}) {},
-				checkJobs:     true,
-				pausedAsReady: false,
-			},
-			args: args{
-				ctx:      context.TODO(),
-				resource: &resource.Info{Object: &appsv1beta1.StatefulSet{}, Name: "foo", Namespace: defaultNamespace},
-			},
-			ss:      newStatefulSet("bar", 1, 0, 1, 1, true),
-			want:    false,
-			wantErr: true,
-		},
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			c := &ReadyChecker{
-				client:        tt.fields.client,
-				log:           tt.fields.log,
-				checkJobs:     tt.fields.checkJobs,
-				pausedAsReady: tt.fields.pausedAsReady,
-			}
-			if _, err := c.client.AppsV1().StatefulSets(defaultNamespace).Create(context.TODO(), tt.ss, metav1.CreateOptions{}); err != nil {
-				t.Errorf("Failed to create StatefulSet error: %v", err)
-				return
-			}
-			got, err := c.IsReady(tt.args.ctx, tt.args.resource)
-			if (err != nil) != tt.wantErr {
-				t.Errorf("IsReady() error = %v, wantErr %v", err, tt.wantErr)
-			}
-			if got != tt.want {
-				t.Errorf("IsReady() = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
-
-func Test_ReadyChecker_IsReady_ReplicationController(t *testing.T) {
-	type fields struct {
-		client        kubernetes.Interface
-		log           func(string, ...interface{})
-		checkJobs     bool
-		pausedAsReady bool
-	}
-	type args struct {
-		ctx      context.Context
-		resource *resource.Info
-	}
-	tests := []struct {
-		name    string
-		fields  fields
-		args    args
-		rc      *corev1.ReplicationController
-		want    bool
-		wantErr bool
-	}{
-		{
-			name: "IsReady ReplicationController",
-			fields: fields{
-				client:        fake.NewSimpleClientset(),
-				log:           func(string, ...interface{}) {},
-				checkJobs:     true,
-				pausedAsReady: false,
-			},
-			args: args{
-				ctx:      context.TODO(),
-				resource: &resource.Info{Object: &corev1.ReplicationController{}, Name: "foo", Namespace: defaultNamespace},
-			},
-			rc:      newReplicationController("foo", false),
-			want:    false,
-			wantErr: false,
-		},
-		{
-			name: "IsReady ReplicationController with error",
-			fields: fields{
-				client:        fake.NewSimpleClientset(),
-				log:           func(string, ...interface{}) {},
-				checkJobs:     true,
-				pausedAsReady: false,
-			},
-			args: args{
-				ctx:      context.TODO(),
-				resource: &resource.Info{Object: &corev1.ReplicationController{}, Name: "foo", Namespace: defaultNamespace},
-			},
-			rc:      newReplicationController("bar", false),
-			want:    false,
-			wantErr: true,
-		},
-		{
-			name: "IsReady ReplicationController and pods not ready for object",
-			fields: fields{
-				client:        fake.NewSimpleClientset(),
-				log:           func(string, ...interface{}) {},
-				checkJobs:     true,
-				pausedAsReady: false,
-			},
-			args: args{
-				ctx:      context.TODO(),
-				resource: &resource.Info{Object: &corev1.ReplicationController{}, Name: "foo", Namespace: defaultNamespace},
-			},
-			rc:      newReplicationController("foo", true),
-			want:    true,
-			wantErr: false,
-		},
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			c := &ReadyChecker{
-				client:        tt.fields.client,
-				log:           tt.fields.log,
-				checkJobs:     tt.fields.checkJobs,
-				pausedAsReady: tt.fields.pausedAsReady,
-			}
-			if _, err := c.client.CoreV1().ReplicationControllers(defaultNamespace).Create(context.TODO(), tt.rc, metav1.CreateOptions{}); err != nil {
-				t.Errorf("Failed to create ReplicationController error: %v", err)
-				return
-			}
-			got, err := c.IsReady(tt.args.ctx, tt.args.resource)
-			if (err != nil) != tt.wantErr {
-				t.Errorf("IsReady() error = %v, wantErr %v", err, tt.wantErr)
-			}
-			if got != tt.want {
-				t.Errorf("IsReady() = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
-
-func Test_ReadyChecker_IsReady_ReplicaSet(t *testing.T) {
-	type fields struct {
-		client        kubernetes.Interface
-		log           func(string, ...interface{})
-		checkJobs     bool
-		pausedAsReady bool
-	}
-	type args struct {
-		ctx      context.Context
-		resource *resource.Info
-	}
-	tests := []struct {
-		name    string
-		fields  fields
-		args    args
-		rs      *appsv1.ReplicaSet
-		want    bool
-		wantErr bool
-	}{
-		{
-			name: "IsReady ReplicaSet",
-			fields: fields{
-				client:        fake.NewSimpleClientset(),
-				log:           func(string, ...interface{}) {},
-				checkJobs:     true,
-				pausedAsReady: false,
-			},
-			args: args{
-				ctx:      context.TODO(),
-				resource: &resource.Info{Object: &extensionsv1beta1.ReplicaSet{}, Name: "foo", Namespace: defaultNamespace},
-			},
-			rs:      newReplicaSet("foo", 1, 1, true),
-			want:    false,
-			wantErr: true,
-		},
-		{
-			name: "IsReady ReplicaSet not ready",
-			fields: fields{
-				client:        fake.NewSimpleClientset(),
-				log:           func(string, ...interface{}) {},
-				checkJobs:     true,
-				pausedAsReady: false,
-			},
-			args: args{
-				ctx:      context.TODO(),
-				resource: &resource.Info{Object: &extensionsv1beta1.ReplicaSet{}, Name: "foo", Namespace: defaultNamespace},
-			},
-			rs:      newReplicaSet("bar", 1, 1, false),
-			want:    false,
-			wantErr: true,
-		},
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			c := &ReadyChecker{
-				client:        tt.fields.client,
-				log:           tt.fields.log,
-				checkJobs:     tt.fields.checkJobs,
-				pausedAsReady: tt.fields.pausedAsReady,
-			}
-			//
-			got, err := c.IsReady(tt.args.ctx, tt.args.resource)
-			if (err != nil) != tt.wantErr {
-				t.Errorf("IsReady() error = %v, wantErr %v", err, tt.wantErr)
-			}
-			if got != tt.want {
-				t.Errorf("IsReady() = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
-
 func Test_ReadyChecker_deploymentReady(t *testing.T) {
 	type args struct {
 		rs  *appsv1.ReplicaSet
@@ -1223,144 +521,6 @@ func Test_ReadyChecker_serviceReady(t *testing.T) {
 	}
 }
 
-func Test_ReadyChecker_crdBetaReady(t *testing.T) {
-	type args struct {
-		crdBeta apiextv1beta1.CustomResourceDefinition
-	}
-	tests := []struct {
-		name string
-		args args
-		want bool
-	}{
-		{
-			name: "crdBeta type is Establish and Conditional is true",
-			args: args{crdBeta: newcrdBetaReady("foo", apiextv1beta1.CustomResourceDefinitionStatus{
-				Conditions: []apiextv1beta1.CustomResourceDefinitionCondition{
-					{
-						Type:   apiextv1beta1.Established,
-						Status: apiextv1beta1.ConditionTrue,
-					},
-				},
-			})},
-			want: true,
-		},
-		{
-			name: "crdBeta type is Establish and Conditional is false",
-			args: args{crdBeta: newcrdBetaReady("foo", apiextv1beta1.CustomResourceDefinitionStatus{
-				Conditions: []apiextv1beta1.CustomResourceDefinitionCondition{
-					{
-						Type:   apiextv1beta1.Established,
-						Status: apiextv1beta1.ConditionFalse,
-					},
-				},
-			})},
-			want: false,
-		},
-		{
-			name: "crdBeta type is NamesAccepted and Conditional is true",
-			args: args{crdBeta: newcrdBetaReady("foo", apiextv1beta1.CustomResourceDefinitionStatus{
-				Conditions: []apiextv1beta1.CustomResourceDefinitionCondition{
-					{
-						Type:   apiextv1beta1.NamesAccepted,
-						Status: apiextv1beta1.ConditionTrue,
-					},
-				},
-			})},
-			want: false,
-		},
-		{
-			name: "crdBeta type is NamesAccepted and Conditional is false",
-			args: args{crdBeta: newcrdBetaReady("foo", apiextv1beta1.CustomResourceDefinitionStatus{
-				Conditions: []apiextv1beta1.CustomResourceDefinitionCondition{
-					{
-						Type:   apiextv1beta1.NamesAccepted,
-						Status: apiextv1beta1.ConditionFalse,
-					},
-				},
-			})},
-			want: true,
-		},
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			c := NewReadyChecker(fake.NewSimpleClientset(), nil)
-			got := c.crdBetaReady(tt.args.crdBeta)
-			if got != tt.want {
-				t.Errorf("crdBetaReady() = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
-
-func Test_ReadyChecker_crdReady(t *testing.T) {
-	type args struct {
-		crdBeta apiextv1.CustomResourceDefinition
-	}
-	tests := []struct {
-		name string
-		args args
-		want bool
-	}{
-		{
-			name: "crdBeta type is Establish and Conditional is true",
-			args: args{crdBeta: newcrdReady("foo", apiextv1.CustomResourceDefinitionStatus{
-				Conditions: []apiextv1.CustomResourceDefinitionCondition{
-					{
-						Type:   apiextv1.Established,
-						Status: apiextv1.ConditionTrue,
-					},
-				},
-			})},
-			want: true,
-		},
-		{
-			name: "crdBeta type is Establish and Conditional is false",
-			args: args{crdBeta: newcrdReady("foo", apiextv1.CustomResourceDefinitionStatus{
-				Conditions: []apiextv1.CustomResourceDefinitionCondition{
-					{
-						Type:   apiextv1.Established,
-						Status: apiextv1.ConditionFalse,
-					},
-				},
-			})},
-			want: false,
-		},
-		{
-			name: "crdBeta type is NamesAccepted and Conditional is true",
-			args: args{crdBeta: newcrdReady("foo", apiextv1.CustomResourceDefinitionStatus{
-				Conditions: []apiextv1.CustomResourceDefinitionCondition{
-					{
-						Type:   apiextv1.NamesAccepted,
-						Status: apiextv1.ConditionTrue,
-					},
-				},
-			})},
-			want: false,
-		},
-		{
-			name: "crdBeta type is NamesAccepted and Conditional is false",
-			args: args{crdBeta: newcrdReady("foo", apiextv1.CustomResourceDefinitionStatus{
-				Conditions: []apiextv1.CustomResourceDefinitionCondition{
-					{
-						Type:   apiextv1.NamesAccepted,
-						Status: apiextv1.ConditionFalse,
-					},
-				},
-			})},
-			want: true,
-		},
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			c := NewReadyChecker(fake.NewSimpleClientset(), nil)
-			got := c.crdReady(tt.args.crdBeta)
-			if got != tt.want {
-				t.Errorf("crdBetaReady() = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
-
 func newStatefulSetWithUpdateRevision(name string, replicas, partition, readyReplicas, updatedReplicas int, updateRevision string, generationInSync bool) *appsv1.StatefulSet {
 	ss := newStatefulSet(name, replicas, partition, readyReplicas, updatedReplicas, generationInSync)
 	ss.Status.UpdateRevision = updateRevision
@@ -1612,28 +772,6 @@ func newService(name string, serviceSpec corev1.ServiceSpec) *corev1.Service {
 	}
 }
 
-func newcrdBetaReady(name string, crdBetaStatus apiextv1beta1.CustomResourceDefinitionStatus) apiextv1beta1.CustomResourceDefinition {
-	return apiextv1beta1.CustomResourceDefinition{
-		ObjectMeta: metav1.ObjectMeta{
-			Name:      name,
-			Namespace: defaultNamespace,
-		},
-		Spec:   apiextv1beta1.CustomResourceDefinitionSpec{},
-		Status: crdBetaStatus,
-	}
-}
-
-func newcrdReady(name string, crdBetaStatus apiextv1.CustomResourceDefinitionStatus) apiextv1.CustomResourceDefinition {
-	return apiextv1.CustomResourceDefinition{
-		ObjectMeta: metav1.ObjectMeta{
-			Name:      name,
-			Namespace: defaultNamespace,
-		},
-		Spec:   apiextv1.CustomResourceDefinitionSpec{},
-		Status: crdBetaStatus,
-	}
-}
-
 func intToInt32(i int) *int32 {
 	i32 := int32(i)
 	return &i32