mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
[KEP-4817] Remove unnecessary DeepCopy in validation tests
Signed-off-by: Lionel Jouin <lionel.jouin@est.tech>
This commit is contained in:
parent
cb9ee1d4fe
commit
5df47a64d3
@ -988,7 +988,6 @@ func TestValidateClaimStatusUpdate(t *testing.T) {
|
||||
"valid-network-device-status": {
|
||||
oldClaim: func() *resource.ResourceClaim { return validAllocatedClaim }(),
|
||||
update: func(claim *resource.ResourceClaim) *resource.ResourceClaim {
|
||||
claim = claim.DeepCopy()
|
||||
claim.Status.Devices = []resource.AllocatedDeviceStatus{
|
||||
{
|
||||
Driver: goodName,
|
||||
@ -1023,7 +1022,6 @@ func TestValidateClaimStatusUpdate(t *testing.T) {
|
||||
},
|
||||
oldClaim: func() *resource.ResourceClaim { return validAllocatedClaim }(),
|
||||
update: func(claim *resource.ResourceClaim) *resource.ResourceClaim {
|
||||
claim = claim.DeepCopy()
|
||||
claim.Status.Devices = []resource.AllocatedDeviceStatus{
|
||||
{
|
||||
Driver: goodName,
|
||||
@ -1046,7 +1044,6 @@ func TestValidateClaimStatusUpdate(t *testing.T) {
|
||||
},
|
||||
oldClaim: func() *resource.ResourceClaim { return validAllocatedClaim }(),
|
||||
update: func(claim *resource.ResourceClaim) *resource.ResourceClaim {
|
||||
claim = claim.DeepCopy()
|
||||
claim.Status.Devices = []resource.AllocatedDeviceStatus{
|
||||
{
|
||||
Driver: goodName,
|
||||
@ -1069,7 +1066,6 @@ func TestValidateClaimStatusUpdate(t *testing.T) {
|
||||
},
|
||||
oldClaim: func() *resource.ResourceClaim { return validAllocatedClaim }(),
|
||||
update: func(claim *resource.ResourceClaim) *resource.ResourceClaim {
|
||||
claim = claim.DeepCopy()
|
||||
claim.Status.Devices = []resource.AllocatedDeviceStatus{
|
||||
{
|
||||
Driver: goodName,
|
||||
@ -1090,7 +1086,6 @@ func TestValidateClaimStatusUpdate(t *testing.T) {
|
||||
},
|
||||
oldClaim: func() *resource.ResourceClaim { return validAllocatedClaim }(),
|
||||
update: func(claim *resource.ResourceClaim) *resource.ResourceClaim {
|
||||
claim = claim.DeepCopy()
|
||||
claim.Status.Devices = []resource.AllocatedDeviceStatus{
|
||||
{
|
||||
Driver: "b",
|
||||
@ -1106,7 +1101,6 @@ func TestValidateClaimStatusUpdate(t *testing.T) {
|
||||
wantFailures: nil,
|
||||
oldClaim: func() *resource.ResourceClaim { return validAllocatedClaim }(),
|
||||
update: func(claim *resource.ResourceClaim) *resource.ResourceClaim {
|
||||
claim = claim.DeepCopy()
|
||||
claim.Status.Devices = []resource.AllocatedDeviceStatus{
|
||||
{
|
||||
Driver: goodName,
|
||||
@ -1127,7 +1121,6 @@ func TestValidateClaimStatusUpdate(t *testing.T) {
|
||||
wantFailures: nil,
|
||||
oldClaim: func() *resource.ResourceClaim { return validAllocatedClaim }(),
|
||||
update: func(claim *resource.ResourceClaim) *resource.ResourceClaim {
|
||||
claim = claim.DeepCopy()
|
||||
claim.Status.Devices = []resource.AllocatedDeviceStatus{
|
||||
{
|
||||
Driver: goodName,
|
||||
@ -1148,7 +1141,6 @@ func TestValidateClaimStatusUpdate(t *testing.T) {
|
||||
wantFailures: nil,
|
||||
oldClaim: func() *resource.ResourceClaim { return validAllocatedClaim }(),
|
||||
update: func(claim *resource.ResourceClaim) *resource.ResourceClaim {
|
||||
claim = claim.DeepCopy()
|
||||
claim.Status.Devices = []resource.AllocatedDeviceStatus{
|
||||
{
|
||||
Driver: goodName,
|
||||
@ -1167,7 +1159,6 @@ func TestValidateClaimStatusUpdate(t *testing.T) {
|
||||
wantFailures: nil,
|
||||
oldClaim: func() *resource.ResourceClaim { return validAllocatedClaim }(),
|
||||
update: func(claim *resource.ResourceClaim) *resource.ResourceClaim {
|
||||
claim = claim.DeepCopy()
|
||||
claim.Status.Devices = []resource.AllocatedDeviceStatus{
|
||||
{
|
||||
Driver: "b",
|
||||
|
Loading…
Reference in New Issue
Block a user