|
|
@ -754,7 +754,7 @@ func Test_ReadyChecker_deploymentReady(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for _, tt := range tests {
|
|
|
|
for _, tt := range tests {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
c := NewReadyChecker(fake.NewClientset(), nil)
|
|
|
|
c := NewReadyChecker(fake.NewClientset())
|
|
|
|
if got := c.deploymentReady(tt.args.rs, tt.args.dep); got != tt.want {
|
|
|
|
if got := c.deploymentReady(tt.args.rs, tt.args.dep); got != tt.want {
|
|
|
|
t.Errorf("deploymentReady() = %v, want %v", got, tt.want)
|
|
|
|
t.Errorf("deploymentReady() = %v, want %v", got, tt.want)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -788,7 +788,7 @@ func Test_ReadyChecker_replicaSetReady(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for _, tt := range tests {
|
|
|
|
for _, tt := range tests {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
c := NewReadyChecker(fake.NewClientset(), nil)
|
|
|
|
c := NewReadyChecker(fake.NewClientset())
|
|
|
|
if got := c.replicaSetReady(tt.args.rs); got != tt.want {
|
|
|
|
if got := c.replicaSetReady(tt.args.rs); got != tt.want {
|
|
|
|
t.Errorf("replicaSetReady() = %v, want %v", got, tt.want)
|
|
|
|
t.Errorf("replicaSetReady() = %v, want %v", got, tt.want)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -822,7 +822,7 @@ func Test_ReadyChecker_replicationControllerReady(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for _, tt := range tests {
|
|
|
|
for _, tt := range tests {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
c := NewReadyChecker(fake.NewClientset(), nil)
|
|
|
|
c := NewReadyChecker(fake.NewClientset())
|
|
|
|
if got := c.replicationControllerReady(tt.args.rc); got != tt.want {
|
|
|
|
if got := c.replicationControllerReady(tt.args.rc); got != tt.want {
|
|
|
|
t.Errorf("replicationControllerReady() = %v, want %v", got, tt.want)
|
|
|
|
t.Errorf("replicationControllerReady() = %v, want %v", got, tt.want)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -877,7 +877,7 @@ func Test_ReadyChecker_daemonSetReady(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for _, tt := range tests {
|
|
|
|
for _, tt := range tests {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
c := NewReadyChecker(fake.NewClientset(), nil)
|
|
|
|
c := NewReadyChecker(fake.NewClientset())
|
|
|
|
if got := c.daemonSetReady(tt.args.ds); got != tt.want {
|
|
|
|
if got := c.daemonSetReady(tt.args.ds); got != tt.want {
|
|
|
|
t.Errorf("daemonSetReady() = %v, want %v", got, tt.want)
|
|
|
|
t.Errorf("daemonSetReady() = %v, want %v", got, tt.want)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -953,7 +953,7 @@ func Test_ReadyChecker_statefulSetReady(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for _, tt := range tests {
|
|
|
|
for _, tt := range tests {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
c := NewReadyChecker(fake.NewClientset(), nil)
|
|
|
|
c := NewReadyChecker(fake.NewClientset())
|
|
|
|
if got := c.statefulSetReady(tt.args.sts); got != tt.want {
|
|
|
|
if got := c.statefulSetReady(tt.args.sts); got != tt.want {
|
|
|
|
t.Errorf("statefulSetReady() = %v, want %v", got, tt.want)
|
|
|
|
t.Errorf("statefulSetReady() = %v, want %v", got, tt.want)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1012,7 +1012,7 @@ func Test_ReadyChecker_podsReadyForObject(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for _, tt := range tests {
|
|
|
|
for _, tt := range tests {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
c := NewReadyChecker(fake.NewClientset(), nil)
|
|
|
|
c := NewReadyChecker(fake.NewClientset())
|
|
|
|
for _, pod := range tt.existPods {
|
|
|
|
for _, pod := range tt.existPods {
|
|
|
|
if _, err := c.client.CoreV1().Pods(defaultNamespace).Create(context.TODO(), &pod, metav1.CreateOptions{}); err != nil {
|
|
|
|
if _, err := c.client.CoreV1().Pods(defaultNamespace).Create(context.TODO(), &pod, metav1.CreateOptions{}); err != nil {
|
|
|
|
t.Errorf("Failed to create Pod error: %v", err)
|
|
|
|
t.Errorf("Failed to create Pod error: %v", err)
|
|
|
@ -1091,7 +1091,7 @@ func Test_ReadyChecker_jobReady(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for _, tt := range tests {
|
|
|
|
for _, tt := range tests {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
c := NewReadyChecker(fake.NewClientset(), nil)
|
|
|
|
c := NewReadyChecker(fake.NewClientset())
|
|
|
|
got, err := c.jobReady(tt.args.job)
|
|
|
|
got, err := c.jobReady(tt.args.job)
|
|
|
|
if (err != nil) != tt.wantErr {
|
|
|
|
if (err != nil) != tt.wantErr {
|
|
|
|
t.Errorf("jobReady() error = %v, wantErr %v", err, tt.wantErr)
|
|
|
|
t.Errorf("jobReady() error = %v, wantErr %v", err, tt.wantErr)
|
|
|
@ -1130,7 +1130,7 @@ func Test_ReadyChecker_volumeReady(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for _, tt := range tests {
|
|
|
|
for _, tt := range tests {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
c := NewReadyChecker(fake.NewClientset(), nil)
|
|
|
|
c := NewReadyChecker(fake.NewClientset())
|
|
|
|
if got := c.volumeReady(tt.args.v); got != tt.want {
|
|
|
|
if got := c.volumeReady(tt.args.v); got != tt.want {
|
|
|
|
t.Errorf("volumeReady() = %v, want %v", got, tt.want)
|
|
|
|
t.Errorf("volumeReady() = %v, want %v", got, tt.want)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1175,7 +1175,7 @@ func Test_ReadyChecker_serviceReady(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for _, tt := range tests {
|
|
|
|
for _, tt := range tests {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
c := NewReadyChecker(fake.NewClientset(), nil)
|
|
|
|
c := NewReadyChecker(fake.NewClientset())
|
|
|
|
got := c.serviceReady(tt.args.service)
|
|
|
|
got := c.serviceReady(tt.args.service)
|
|
|
|
if got != tt.want {
|
|
|
|
if got != tt.want {
|
|
|
|
t.Errorf("serviceReady() = %v, want %v", got, tt.want)
|
|
|
|
t.Errorf("serviceReady() = %v, want %v", got, tt.want)
|
|
|
@ -1244,7 +1244,7 @@ func Test_ReadyChecker_crdBetaReady(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for _, tt := range tests {
|
|
|
|
for _, tt := range tests {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
c := NewReadyChecker(fake.NewClientset(), nil)
|
|
|
|
c := NewReadyChecker(fake.NewClientset())
|
|
|
|
got := c.crdBetaReady(tt.args.crdBeta)
|
|
|
|
got := c.crdBetaReady(tt.args.crdBeta)
|
|
|
|
if got != tt.want {
|
|
|
|
if got != tt.want {
|
|
|
|
t.Errorf("crdBetaReady() = %v, want %v", got, tt.want)
|
|
|
|
t.Errorf("crdBetaReady() = %v, want %v", got, tt.want)
|
|
|
@ -1313,7 +1313,7 @@ func Test_ReadyChecker_crdReady(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for _, tt := range tests {
|
|
|
|
for _, tt := range tests {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
|
c := NewReadyChecker(fake.NewClientset(), nil)
|
|
|
|
c := NewReadyChecker(fake.NewClientset())
|
|
|
|
got := c.crdReady(tt.args.crdBeta)
|
|
|
|
got := c.crdReady(tt.args.crdBeta)
|
|
|
|
if got != tt.want {
|
|
|
|
if got != tt.want {
|
|
|
|
t.Errorf("crdBetaReady() = %v, want %v", got, tt.want)
|
|
|
|
t.Errorf("crdBetaReady() = %v, want %v", got, tt.want)
|
|
|
|