@@ -16,10 +16,12 @@ import (
16
16
rbacv1 "k8s.io/api/rbac/v1"
17
17
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions"
18
18
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
19
+ "k8s.io/apimachinery/pkg/api/equality"
19
20
k8serrors "k8s.io/apimachinery/pkg/api/errors"
20
21
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21
22
k8slabels "k8s.io/apimachinery/pkg/labels"
22
23
"k8s.io/apimachinery/pkg/runtime"
24
+ "k8s.io/apimachinery/pkg/util/diff"
23
25
"k8s.io/apimachinery/pkg/util/intstr"
24
26
"k8s.io/apimachinery/pkg/util/wait"
25
27
"k8s.io/apimachinery/pkg/watch"
@@ -1551,7 +1553,7 @@ var _ = Describe("ClusterServiceVersion", func() {
1551
1553
// Fetch cluster service version again to check for unnecessary control loops
1552
1554
sameCSV , err := fetchCSV (crc , csv .Name , testNamespace , csvSucceededChecker )
1553
1555
Expect (err ).ShouldNot (HaveOccurred ())
1554
- compareResources ( GinkgoT (), fetchedCSV , sameCSV )
1556
+ Expect ( equality . Semantic . DeepEqual ( fetchedCSV , sameCSV )). Should ( BeTrue (), diff . ObjectDiff ( fetchedCSV , sameCSV ) )
1555
1557
})
1556
1558
It ("create with owned API service" , func () {
1557
1559
@@ -2547,7 +2549,7 @@ var _ = Describe("ClusterServiceVersion", func() {
2547
2549
// Fetch cluster service version again to check for unnecessary control loops
2548
2550
sameCSV , err := fetchCSV (crc , csvNew .Name , testNamespace , csvSucceededChecker )
2549
2551
Expect (err ).ShouldNot (HaveOccurred ())
2550
- compareResources ( GinkgoT (), fetchedCSV , sameCSV )
2552
+ Expect ( equality . Semantic . DeepEqual ( fetchedCSV , sameCSV )). Should ( BeTrue (), diff . ObjectDiff ( fetchedCSV , sameCSV ) )
2551
2553
})
2552
2554
It ("update different deployment name" , func () {
2553
2555
@@ -2725,7 +2727,7 @@ var _ = Describe("ClusterServiceVersion", func() {
2725
2727
// Fetch cluster service version again to check for unnecessary control loops
2726
2728
sameCSV , err := fetchCSV (crc , csvNew .Name , testNamespace , csvSucceededChecker )
2727
2729
Expect (err ).ShouldNot (HaveOccurred ())
2728
- compareResources ( GinkgoT (), fetchedCSV , sameCSV )
2730
+ Expect ( equality . Semantic . DeepEqual ( fetchedCSV , sameCSV )). Should ( BeTrue (), diff . ObjectDiff ( fetchedCSV , sameCSV ) )
2729
2731
2730
2732
// Should have created new deployment and deleted old
2731
2733
depNew , err := c .GetDeployment (testNamespace , strategyNew .DeploymentSpecs [0 ].Name )
@@ -2915,7 +2917,7 @@ var _ = Describe("ClusterServiceVersion", func() {
2915
2917
// Fetch cluster service version again to check for unnecessary control loops
2916
2918
sameCSV , err := fetchCSV (crc , csvNew .Name , testNamespace , csvSucceededChecker )
2917
2919
Expect (err ).ShouldNot (HaveOccurred ())
2918
- compareResources ( GinkgoT (), fetchedCSV , sameCSV )
2920
+ Expect ( equality . Semantic . DeepEqual ( fetchedCSV , sameCSV )). Should ( BeTrue (), diff . ObjectDiff ( fetchedCSV , sameCSV ) )
2919
2921
2920
2922
// Should have created new deployment and deleted old
2921
2923
depNew , err := c .GetDeployment (testNamespace , strategyNew .DeploymentSpecs [0 ].Name )
@@ -3285,7 +3287,7 @@ var _ = Describe("ClusterServiceVersion", func() {
3285
3287
// Fetch cluster service version again to check for unnecessary control loops
3286
3288
sameCSV , err := fetchCSV (crc , csvNew .Name , testNamespace , csvSucceededChecker )
3287
3289
Expect (err ).ShouldNot (HaveOccurred ())
3288
- compareResources ( GinkgoT (), fetchedCSV , sameCSV )
3290
+ Expect ( equality . Semantic . DeepEqual ( fetchedCSV , sameCSV )). Should ( BeTrue (), diff . ObjectDiff ( fetchedCSV , sameCSV ) )
3289
3291
3290
3292
// Should have created new deployment and deleted old one
3291
3293
depNew , err := c .GetDeployment (testNamespace , strategyNew .DeploymentSpecs [0 ].Name )
@@ -3364,7 +3366,7 @@ var _ = Describe("ClusterServiceVersion", func() {
3364
3366
// Fetch cluster service version again to check for unnecessary control loops
3365
3367
sameCSV , err = fetchCSV (crc , csvNew2 .Name , testNamespace , csvSucceededChecker )
3366
3368
Expect (err ).ShouldNot (HaveOccurred ())
3367
- compareResources ( GinkgoT (), fetchedCSV , sameCSV )
3369
+ Expect ( equality . Semantic . DeepEqual ( fetchedCSV , sameCSV )). Should ( BeTrue (), diff . ObjectDiff ( fetchedCSV , sameCSV ) )
3368
3370
3369
3371
// Should have created new deployment and deleted old one
3370
3372
depNew , err = c .GetDeployment (testNamespace , strategyNew2 .DeploymentSpecs [0 ].Name )
0 commit comments