Skip to content

Commit

Permalink
Update controller-runtime to v0.10.1
Browse files Browse the repository at this point in the history
Also updates the tests to be compatible with the breaking changes in
controller-runtime > v0.10.0.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
  • Loading branch information
darkowlzz committed Oct 1, 2021
1 parent 486c6cf commit 467d97a
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 36 deletions.
16 changes: 4 additions & 12 deletions controllers/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,9 @@ Images:
},
},
},
Status: imagev1_reflect.ImagePolicyStatus{
LatestImage: "helloworld:v1.0.0",
},
}
Expect(k8sClient.Create(context.Background(), policy)).To(Succeed())
policy.Status.LatestImage = "helloworld:v1.0.0"
Expect(k8sClient.Status().Update(context.Background(), policy)).To(Succeed())

// Format the expected message given the generated values
Expand Down Expand Up @@ -343,11 +341,9 @@ Images:
},
},
},
Status: imagev1_reflect.ImagePolicyStatus{
LatestImage: "helloworld:v1.0.0",
},
}
Expect(k8sClient.Create(context.Background(), policy)).To(Succeed())
policy.Status.LatestImage = "helloworld:v1.0.0"
Expect(k8sClient.Status().Update(context.Background(), policy)).To(Succeed())

// Insert a setter reference into the deployment file,
Expand Down Expand Up @@ -472,11 +468,9 @@ Images:
},
},
},
Status: imagev1_reflect.ImagePolicyStatus{
LatestImage: "helloworld:v1.0.0",
},
}
Expect(k8sClient.Create(context.Background(), policy)).To(Succeed())
policy.Status.LatestImage = "helloworld:v1.0.0"
Expect(k8sClient.Status().Update(context.Background(), policy)).To(Succeed())

// Insert a setter reference into the deployment file,
Expand Down Expand Up @@ -693,11 +687,9 @@ Images:
},
},
},
Status: imagev1_reflect.ImagePolicyStatus{
LatestImage: latestImage,
},
}
Expect(k8sClient.Create(context.Background(), policy)).To(Succeed())
policy.Status.LatestImage = latestImage
Expect(k8sClient.Status().Update(context.Background(), policy)).To(Succeed())

})
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ require (
github.com/google/go-containerregistry v0.6.0
github.com/libgit2/git2go/v31 v31.4.14
github.com/onsi/ginkgo v1.16.4
github.com/onsi/gomega v1.14.0
github.com/onsi/gomega v1.15.0
github.com/otiai10/copy v1.2.0
github.com/spf13/pflag v1.0.5
k8s.io/api v0.21.3
k8s.io/apimachinery v0.21.3
k8s.io/client-go v0.21.3
k8s.io/api v0.22.2
k8s.io/apimachinery v0.22.2
k8s.io/client-go v0.22.2
k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e
sigs.k8s.io/controller-runtime v0.9.5
sigs.k8s.io/controller-runtime v0.10.1
sigs.k8s.io/kustomize/kyaml v0.10.21
)

Expand Down
Loading

0 comments on commit 467d97a

Please sign in to comment.