Skip to content

Commit bfe5fe5

Browse files
k8s-ci-robotalvaroaleman
authored andcommitted
Merge pull request kubernetes-sigs#1862 from damdo/pkg-envtest-komega-fix-updatestatus-godoc
🐛 pkg: envtest: komega: fix UpdateStatus & typos in godoc
2 parents 188b486 + bc7cc68 commit bfe5fe5

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ jobs:
1919
- name: golangci-lint
2020
uses: golangci/golangci-lint-action@v2
2121
with:
22-
version: v1.40.1
22+
version: v1.45.2
2323
working-directory: ${{matrix.working-directory}}

pkg/envtest/komega/default.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func List(list client.ObjectList, opts ...client.ListOption) func() error {
5151
// gomega.Eventually(k.Update(&deployment, func (o client.Object) {
5252
// deployment.Spec.Replicas = 3
5353
// return &deployment
54-
// })).To(gomega.Scucceed())
54+
// })).To(gomega.Succeed())
5555
// By calling the returned function directly it can also be used as gomega.Expect(k.Update(...)()).To(...)
5656
func Update(obj client.Object, f func(), opts ...client.UpdateOption) func() error {
5757
checkDefaultClient()
@@ -61,10 +61,10 @@ func Update(obj client.Object, f func(), opts ...client.UpdateOption) func() err
6161
// UpdateStatus returns a function that fetches a resource, applies the provided update function and then updates the resource's status.
6262
// It can be used with gomega.Eventually() like this:
6363
// deployment := appsv1.Deployment{ ... }
64-
// gomega.Eventually(k.Update(&deployment, func (o client.Object) {
64+
// gomega.Eventually(k.UpdateStatus(&deployment, func (o client.Object) {
6565
// deployment.Status.AvailableReplicas = 1
6666
// return &deployment
67-
// })).To(gomega.Scucceed())
67+
// })).To(gomega.Succeed())
6868
// By calling the returned function directly it can also be used as gomega.Expect(k.UpdateStatus(...)()).To(...)
6969
func UpdateStatus(obj client.Object, f func(), opts ...client.UpdateOption) func() error {
7070
checkDefaultClient()

pkg/envtest/komega/interfaces.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ type Komega interface {
4545
// gomega.Eventually(k.Update(&deployment, func (o client.Object) {
4646
// deployment.Spec.Replicas = 3
4747
// return &deployment
48-
// })).To(gomega.Scucceed())
48+
// })).To(gomega.Succeed())
4949
// By calling the returned function directly it can also be used as gomega.Expect(k.Update(...)()).To(...)
5050
Update(client.Object, func(), ...client.UpdateOption) func() error
5151

@@ -55,7 +55,7 @@ type Komega interface {
5555
// gomega.Eventually(k.Update(&deployment, func (o client.Object) {
5656
// deployment.Status.AvailableReplicas = 1
5757
// return &deployment
58-
// })).To(gomega.Scucceed())
58+
// })).To(gomega.Succeed())
5959
// By calling the returned function directly it can also be used as gomega.Expect(k.UpdateStatus(...)()).To(...)
6060
UpdateStatus(client.Object, func(), ...client.UpdateOption) func() error
6161

0 commit comments

Comments
 (0)