@@ -1008,7 +1008,7 @@ func TestValidateClaimStatusUpdate(t *testing.T) {
1008
1008
NetworkData : & resource.NetworkDeviceData {
1009
1009
InterfaceName : strings .Repeat ("x" , 256 ),
1010
1010
HardwareAddress : strings .Repeat ("x" , 128 ),
1011
- Addresses : []string {
1011
+ IPs : []string {
1012
1012
"10.9.8.0/24" ,
1013
1013
"2001:db8::/64" ,
1014
1014
"10.9.8.1/24" ,
@@ -1023,7 +1023,7 @@ func TestValidateClaimStatusUpdate(t *testing.T) {
1023
1023
},
1024
1024
"invalid-device-status-duplicate" : {
1025
1025
wantFailures : field.ErrorList {
1026
- field .Duplicate (field .NewPath ("status" , "devices" ).Index (0 ).Child ("networkData" , "addresses " ).Index (1 ), "2001:db8::1/64" ),
1026
+ field .Duplicate (field .NewPath ("status" , "devices" ).Index (0 ).Child ("networkData" , "ips " ).Index (1 ), "2001:db8::1/64" ),
1027
1027
field .Duplicate (field .NewPath ("status" , "devices" ).Index (1 ).Child ("deviceID" ), structured .MakeDeviceID (goodName , goodName , goodName )),
1028
1028
},
1029
1029
oldClaim : func () * resource.ResourceClaim { return validAllocatedClaim }(),
@@ -1034,7 +1034,7 @@ func TestValidateClaimStatusUpdate(t *testing.T) {
1034
1034
Pool : goodName ,
1035
1035
Device : goodName ,
1036
1036
NetworkData : & resource.NetworkDeviceData {
1037
- Addresses : []string {
1037
+ IPs : []string {
1038
1038
"2001:db8::1/64" ,
1039
1039
"2001:0db8::1/64" ,
1040
1040
},
@@ -1054,7 +1054,7 @@ func TestValidateClaimStatusUpdate(t *testing.T) {
1054
1054
wantFailures : field.ErrorList {
1055
1055
field .TooLong (field .NewPath ("status" , "devices" ).Index (0 ).Child ("networkData" , "interfaceName" ), "" , interfaceNameMaxLength ),
1056
1056
field .TooLong (field .NewPath ("status" , "devices" ).Index (0 ).Child ("networkData" , "hardwareAddress" ), "" , hardwareAddressMaxLength ),
1057
- field .Invalid (field .NewPath ("status" , "devices" ).Index (0 ).Child ("networkData" , "addresses " ).Index (0 ), "300.9.8.0/24" , "must be a valid CIDR value, (e.g. 10.9.8.0/24 or 2001:db8::/64)" ),
1057
+ field .Invalid (field .NewPath ("status" , "devices" ).Index (0 ).Child ("networkData" , "ips " ).Index (0 ), "300.9.8.0/24" , "must be a valid CIDR value, (e.g. 10.9.8.0/24 or 2001:db8::/64)" ),
1058
1058
},
1059
1059
oldClaim : func () * resource.ResourceClaim { return validAllocatedClaim }(),
1060
1060
update : func (claim * resource.ResourceClaim ) * resource.ResourceClaim {
@@ -1066,7 +1066,7 @@ func TestValidateClaimStatusUpdate(t *testing.T) {
1066
1066
NetworkData : & resource.NetworkDeviceData {
1067
1067
InterfaceName : strings .Repeat ("x" , interfaceNameMaxLength + 1 ),
1068
1068
HardwareAddress : strings .Repeat ("x" , hardwareAddressMaxLength + 1 ),
1069
- Addresses : []string {
1069
+ IPs : []string {
1070
1070
"300.9.8.0/24" ,
1071
1071
},
1072
1072
},
@@ -1115,7 +1115,7 @@ func TestValidateClaimStatusUpdate(t *testing.T) {
1115
1115
},
1116
1116
"invalid-device-status-duplicate-disabled-feature-gate" : {
1117
1117
wantFailures : field.ErrorList {
1118
- field .Duplicate (field .NewPath ("status" , "devices" ).Index (0 ).Child ("networkData" , "addresses " ).Index (1 ), "2001:db8::1/64" ),
1118
+ field .Duplicate (field .NewPath ("status" , "devices" ).Index (0 ).Child ("networkData" , "ips " ).Index (1 ), "2001:db8::1/64" ),
1119
1119
field .Duplicate (field .NewPath ("status" , "devices" ).Index (1 ).Child ("deviceID" ), structured .MakeDeviceID (goodName , goodName , goodName )),
1120
1120
},
1121
1121
oldClaim : func () * resource.ResourceClaim { return validAllocatedClaim }(),
@@ -1126,7 +1126,7 @@ func TestValidateClaimStatusUpdate(t *testing.T) {
1126
1126
Pool : goodName ,
1127
1127
Device : goodName ,
1128
1128
NetworkData : & resource.NetworkDeviceData {
1129
- Addresses : []string {
1129
+ IPs : []string {
1130
1130
"2001:db8::1/64" ,
1131
1131
"2001:0db8::1/64" ,
1132
1132
},
@@ -1146,7 +1146,7 @@ func TestValidateClaimStatusUpdate(t *testing.T) {
1146
1146
wantFailures : field.ErrorList {
1147
1147
field .TooLong (field .NewPath ("status" , "devices" ).Index (0 ).Child ("networkData" , "interfaceName" ), "" , interfaceNameMaxLength ),
1148
1148
field .TooLong (field .NewPath ("status" , "devices" ).Index (0 ).Child ("networkData" , "hardwareAddress" ), "" , hardwareAddressMaxLength ),
1149
- field .Invalid (field .NewPath ("status" , "devices" ).Index (0 ).Child ("networkData" , "addresses " ).Index (0 ), "300.9.8.0/24" , "must be a valid CIDR value, (e.g. 10.9.8.0/24 or 2001:db8::/64)" ),
1149
+ field .Invalid (field .NewPath ("status" , "devices" ).Index (0 ).Child ("networkData" , "ips " ).Index (0 ), "300.9.8.0/24" , "must be a valid CIDR value, (e.g. 10.9.8.0/24 or 2001:db8::/64)" ),
1150
1150
},
1151
1151
oldClaim : func () * resource.ResourceClaim { return validAllocatedClaim }(),
1152
1152
update : func (claim * resource.ResourceClaim ) * resource.ResourceClaim {
@@ -1158,7 +1158,7 @@ func TestValidateClaimStatusUpdate(t *testing.T) {
1158
1158
NetworkData : & resource.NetworkDeviceData {
1159
1159
InterfaceName : strings .Repeat ("x" , interfaceNameMaxLength + 1 ),
1160
1160
HardwareAddress : strings .Repeat ("x" , hardwareAddressMaxLength + 1 ),
1161
- Addresses : []string {
1161
+ IPs : []string {
1162
1162
"300.9.8.0/24" ,
1163
1163
},
1164
1164
},
0 commit comments