Skip to content

Commit dffc12a

Browse files
committed
status is now removed from object after it is created
1 parent a84edf2 commit dffc12a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

pkg/controller/operators/adoption_controller_test.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@ var _ = Describe("Adoption Controller", func() {
8080
Spec: &operatorsv1alpha1.SubscriptionSpec{
8181
Package: "poultry",
8282
},
83-
Status: operatorsv1alpha1.SubscriptionStatus{
84-
InstalledCSV: "turkey",
85-
LastUpdated: metav1.Now(),
86-
},
8783
}
8884
sub.SetNamespace(ns.GetName())
8985
sub.SetName(sub.Spec.Package)
@@ -94,12 +90,14 @@ var _ = Describe("Adoption Controller", func() {
9490
created = append(created, sub)
9591

9692
// Set the Subscription's status separately
97-
status := sub.DeepCopy().Status
9893
Eventually(func() error {
9994
if err := k8sClient.Get(ctx, testobj.NamespacedName(sub), sub); err != nil {
10095
return err
10196
}
102-
sub.Status = status
97+
sub.Status = operatorsv1alpha1.SubscriptionStatus{
98+
InstalledCSV: "turkey",
99+
LastUpdated: metav1.Now(),
100+
}
103101

104102
return k8sClient.Status().Update(ctx, sub)
105103
}, timeout, interval).Should(Succeed())

0 commit comments

Comments
 (0)