Skip to content

Commit e8c9f86

Browse files
committed
fixup: Satisfy linter
1 parent c3281ca commit e8c9f86

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/fixture/tmpnet/kube_runtime.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,7 @@ func (p *KubeRuntime) Start(ctx context.Context) error {
192192
zap.String("statefulSet", statefulSetName),
193193
)
194194
_, err = clientset.AppsV1().StatefulSets(namespace).Get(ctx, statefulSetName, metav1.GetOptions{})
195-
if err != nil {
196-
if !apierrors.IsNotFound(err) {
197-
return fmt.Errorf("failed to retrieve StatefulSet %s/%s: %w", namespace, statefulSetName, err)
198-
}
199-
} else {
195+
if err == nil {
200196
// Stateful exists - make sure it is scaled up and running
201197

202198
log.Debug("attempting to retrieve scale for existing StatefulSet",
@@ -241,6 +237,8 @@ func (p *KubeRuntime) Start(ctx context.Context) error {
241237
)
242238

243239
return nil
240+
} else if !apierrors.IsNotFound(err) {
241+
return fmt.Errorf("failed to retrieve StatefulSet %s/%s: %w", namespace, statefulSetName, err)
244242
}
245243

246244
// StatefulSet does not exist - create it

0 commit comments

Comments
 (0)