mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-21 12:48:30 +00:00
remove unused code
Kubernetes-commit: f495d7656ca79e2d5cae03b37977e75369352645
This commit is contained in:
parent
90ef078c30
commit
aa892ab1ac
@ -5,34 +5,11 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"k8s.io/apimachinery/pkg/api/equality"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/apimachinery/pkg/conversion"
|
||||
"k8s.io/apimachinery/pkg/util/yaml"
|
||||
"k8s.io/client-go/util/csaupgrade"
|
||||
)
|
||||
|
||||
var avoidTimestampEqualities = func() conversion.Equalities {
|
||||
var eqs = equality.Semantic.Copy()
|
||||
|
||||
err := eqs.AddFunc(
|
||||
func(a, b metav1.ManagedFieldsEntry) bool {
|
||||
// Two objects' managed fields are equivalent if, ignoring timestamp,
|
||||
// the objects are deeply equal.
|
||||
a.Time = nil
|
||||
b.Time = nil
|
||||
return reflect.DeepEqual(a, b)
|
||||
},
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return eqs
|
||||
}()
|
||||
|
||||
func TestUpgradeCSA(t *testing.T) {
|
||||
// Initial object has managed fields from using CSA
|
||||
originalYAML := []byte(`
|
||||
|
Loading…
Reference in New Issue
Block a user