Skip to content

Commit ce7ad55

Browse files
committed
(chore) remove incorrect log
The onboard capi annotation test had incorrect logs. This PR removes it.
1 parent 4671872 commit ce7ad55

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

test/fv/capi_onboard_annotation_test.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package fv_test
1919
import (
2020
"context"
2121
"fmt"
22+
"strings"
2223
"time"
2324

2425
. "github.com/onsi/ginkgo/v2"
@@ -45,12 +46,12 @@ var _ = Describe("Helm", Serial, func() {
4546
)
4647

4748
BeforeEach(func() {
48-
Byf("Set capi-onboard-annotation for addon-controller")
49+
Byf("Set capi-onboard-annotation for deployment %s/%s", addonDeplNamespace, addonDeplName)
4950
updateOnboardAnnotationArg(addonDeplNamespace, addonDeplName, onboardAnnotation)
5051
})
5152

5253
AfterEach(func() {
53-
Byf("Reset capi-onboard-annotation for addon-controller")
54+
Byf("Reset capi-onboard-annotation for deployment %s/%s", addonDeplNamespace, addonDeplName)
5455
updateOnboardAnnotationArg(addonDeplNamespace, addonDeplName, "")
5556
})
5657

@@ -150,16 +151,17 @@ func updateOnboardAnnotationArg(addonDeplNamespace, addonDeplName, value string)
150151
types.NamespacedName{Namespace: addonDeplNamespace, Name: addonDeplName},
151152
depl)).To(Succeed())
152153

154+
found := false
153155
for i := range depl.Spec.Template.Spec.Containers {
154156
container := depl.Spec.Template.Spec.Containers[i]
155157
for j := range container.Args {
156-
Byf("MGIANLUC %s", container.Args[j])
157-
if container.Args[j] == "--capi-onboard-annotation=" {
158-
Byf("MGIANLUC found")
158+
if strings.Contains(container.Args[j], "--capi-onboard-annotation=") {
159+
found = true
159160
container.Args[j] = fmt.Sprintf("--capi-onboard-annotation=%s", value)
160161
}
161162
}
162163
}
164+
Expect(found).To(BeTrue())
163165

164166
Expect(k8sClient.Update(context.TODO(), depl)).To(Succeed())
165167

0 commit comments

Comments
 (0)