mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Merge pull request #85258 from liggitt/fuzz-pointer-intstr
Include *intstr.IntOrString in API compatibility test fixtures
This commit is contained in:
commit
d11374d330
@ -1380,7 +1380,7 @@
|
|||||||
"updateStrategy": {
|
"updateStrategy": {
|
||||||
"type": "荥ơ'禧ǵŊ)TiD¢ƿ媴h5",
|
"type": "荥ơ'禧ǵŊ)TiD¢ƿ媴h5",
|
||||||
"rollingUpdate": {
|
"rollingUpdate": {
|
||||||
|
"maxUnavailable": 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minReadySeconds": 212061711,
|
"minReadySeconds": 212061711,
|
||||||
|
Binary file not shown.
@ -941,7 +941,8 @@ spec:
|
|||||||
storagePolicyName: "103"
|
storagePolicyName: "103"
|
||||||
volumePath: "101"
|
volumePath: "101"
|
||||||
updateStrategy:
|
updateStrategy:
|
||||||
rollingUpdate: {}
|
rollingUpdate:
|
||||||
|
maxUnavailable: 2
|
||||||
type: 荥ơ'禧ǵŊ)TiD¢ƿ媴h5
|
type: 荥ơ'禧ǵŊ)TiD¢ƿ媴h5
|
||||||
status:
|
status:
|
||||||
collisionCount: -449319810
|
collisionCount: -449319810
|
||||||
|
@ -1376,7 +1376,8 @@
|
|||||||
"strategy": {
|
"strategy": {
|
||||||
"type": "荥ơ'禧ǵŊ)TiD¢ƿ媴h5",
|
"type": "荥ơ'禧ǵŊ)TiD¢ƿ媴h5",
|
||||||
"rollingUpdate": {
|
"rollingUpdate": {
|
||||||
|
"maxUnavailable": 2,
|
||||||
|
"maxSurge": 3
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minReadySeconds": 212061711,
|
"minReadySeconds": 212061711,
|
||||||
|
Binary file not shown.
@ -41,7 +41,9 @@ spec:
|
|||||||
matchLabels:
|
matchLabels:
|
||||||
74404d5---g8c2-k-91e.y5-g--58----0683-b-w7ld-6cs06xj-x5yv0wm-k18/M_-Nx.N_6-___._-.-W._AAn---v_-5-_8LXj: 6-4_WE-_JTrcd-2.-__E_Sv__26KX_R_.-.Nth._--S_4DA_-5_-4lQ42M--1
|
74404d5---g8c2-k-91e.y5-g--58----0683-b-w7ld-6cs06xj-x5yv0wm-k18/M_-Nx.N_6-___._-.-W._AAn---v_-5-_8LXj: 6-4_WE-_JTrcd-2.-__E_Sv__26KX_R_.-.Nth._--S_4DA_-5_-4lQ42M--1
|
||||||
strategy:
|
strategy:
|
||||||
rollingUpdate: {}
|
rollingUpdate:
|
||||||
|
maxSurge: 3
|
||||||
|
maxUnavailable: 2
|
||||||
type: 荥ơ'禧ǵŊ)TiD¢ƿ媴h5
|
type: 荥ơ'禧ǵŊ)TiD¢ƿ媴h5
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -1376,7 +1376,8 @@
|
|||||||
"strategy": {
|
"strategy": {
|
||||||
"type": "荥ơ'禧ǵŊ)TiD¢ƿ媴h5",
|
"type": "荥ơ'禧ǵŊ)TiD¢ƿ媴h5",
|
||||||
"rollingUpdate": {
|
"rollingUpdate": {
|
||||||
|
"maxUnavailable": 2,
|
||||||
|
"maxSurge": 3
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minReadySeconds": 212061711,
|
"minReadySeconds": 212061711,
|
||||||
|
Binary file not shown.
@ -43,7 +43,9 @@ spec:
|
|||||||
matchLabels:
|
matchLabels:
|
||||||
74404d5---g8c2-k-91e.y5-g--58----0683-b-w7ld-6cs06xj-x5yv0wm-k18/M_-Nx.N_6-___._-.-W._AAn---v_-5-_8LXj: 6-4_WE-_JTrcd-2.-__E_Sv__26KX_R_.-.Nth._--S_4DA_-5_-4lQ42M--1
|
74404d5---g8c2-k-91e.y5-g--58----0683-b-w7ld-6cs06xj-x5yv0wm-k18/M_-Nx.N_6-___._-.-W._AAn---v_-5-_8LXj: 6-4_WE-_JTrcd-2.-__E_Sv__26KX_R_.-.Nth._--S_4DA_-5_-4lQ42M--1
|
||||||
strategy:
|
strategy:
|
||||||
rollingUpdate: {}
|
rollingUpdate:
|
||||||
|
maxSurge: 3
|
||||||
|
maxUnavailable: 2
|
||||||
type: 荥ơ'禧ǵŊ)TiD¢ƿ媴h5
|
type: 荥ơ'禧ǵŊ)TiD¢ƿ媴h5
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -1380,7 +1380,7 @@
|
|||||||
"updateStrategy": {
|
"updateStrategy": {
|
||||||
"type": "荥ơ'禧ǵŊ)TiD¢ƿ媴h5",
|
"type": "荥ơ'禧ǵŊ)TiD¢ƿ媴h5",
|
||||||
"rollingUpdate": {
|
"rollingUpdate": {
|
||||||
|
"maxUnavailable": 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minReadySeconds": 212061711,
|
"minReadySeconds": 212061711,
|
||||||
|
Binary file not shown.
@ -941,7 +941,8 @@ spec:
|
|||||||
storagePolicyName: "103"
|
storagePolicyName: "103"
|
||||||
volumePath: "101"
|
volumePath: "101"
|
||||||
updateStrategy:
|
updateStrategy:
|
||||||
rollingUpdate: {}
|
rollingUpdate:
|
||||||
|
maxUnavailable: 2
|
||||||
type: 荥ơ'禧ǵŊ)TiD¢ƿ媴h5
|
type: 荥ơ'禧ǵŊ)TiD¢ƿ媴h5
|
||||||
status:
|
status:
|
||||||
collisionCount: -449319810
|
collisionCount: -449319810
|
||||||
|
@ -1376,7 +1376,8 @@
|
|||||||
"strategy": {
|
"strategy": {
|
||||||
"type": "荥ơ'禧ǵŊ)TiD¢ƿ媴h5",
|
"type": "荥ơ'禧ǵŊ)TiD¢ƿ媴h5",
|
||||||
"rollingUpdate": {
|
"rollingUpdate": {
|
||||||
|
"maxUnavailable": 2,
|
||||||
|
"maxSurge": 3
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minReadySeconds": 212061711,
|
"minReadySeconds": 212061711,
|
||||||
|
Binary file not shown.
@ -41,7 +41,9 @@ spec:
|
|||||||
matchLabels:
|
matchLabels:
|
||||||
74404d5---g8c2-k-91e.y5-g--58----0683-b-w7ld-6cs06xj-x5yv0wm-k18/M_-Nx.N_6-___._-.-W._AAn---v_-5-_8LXj: 6-4_WE-_JTrcd-2.-__E_Sv__26KX_R_.-.Nth._--S_4DA_-5_-4lQ42M--1
|
74404d5---g8c2-k-91e.y5-g--58----0683-b-w7ld-6cs06xj-x5yv0wm-k18/M_-Nx.N_6-___._-.-W._AAn---v_-5-_8LXj: 6-4_WE-_JTrcd-2.-__E_Sv__26KX_R_.-.Nth._--S_4DA_-5_-4lQ42M--1
|
||||||
strategy:
|
strategy:
|
||||||
rollingUpdate: {}
|
rollingUpdate:
|
||||||
|
maxSurge: 3
|
||||||
|
maxUnavailable: 2
|
||||||
type: 荥ơ'禧ǵŊ)TiD¢ƿ媴h5
|
type: 荥ơ'禧ǵŊ)TiD¢ƿ媴h5
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -43,6 +43,8 @@
|
|||||||
"spec": {
|
"spec": {
|
||||||
"holderIdentity": "19",
|
"holderIdentity": "19",
|
||||||
"leaseDurationSeconds": 896585016,
|
"leaseDurationSeconds": 896585016,
|
||||||
|
"acquireTime": "1970-01-01T00:00:02.000000Z",
|
||||||
|
"renewTime": "1970-01-01T00:00:03.000000Z",
|
||||||
"leaseTransitions": 1305381319
|
"leaseTransitions": 1305381319
|
||||||
}
|
}
|
||||||
}
|
}
|
Binary file not shown.
@ -30,6 +30,8 @@ metadata:
|
|||||||
selfLink: "5"
|
selfLink: "5"
|
||||||
uid: "7"
|
uid: "7"
|
||||||
spec:
|
spec:
|
||||||
|
acquireTime: "1970-01-01T00:00:02.000000Z"
|
||||||
holderIdentity: "19"
|
holderIdentity: "19"
|
||||||
leaseDurationSeconds: 896585016
|
leaseDurationSeconds: 896585016
|
||||||
leaseTransitions: 1305381319
|
leaseTransitions: 1305381319
|
||||||
|
renewTime: "1970-01-01T00:00:03.000000Z"
|
||||||
|
@ -43,6 +43,8 @@
|
|||||||
"spec": {
|
"spec": {
|
||||||
"holderIdentity": "19",
|
"holderIdentity": "19",
|
||||||
"leaseDurationSeconds": 896585016,
|
"leaseDurationSeconds": 896585016,
|
||||||
|
"acquireTime": "1970-01-01T00:00:02.000000Z",
|
||||||
|
"renewTime": "1970-01-01T00:00:03.000000Z",
|
||||||
"leaseTransitions": 1305381319
|
"leaseTransitions": 1305381319
|
||||||
}
|
}
|
||||||
}
|
}
|
Binary file not shown.
@ -30,6 +30,8 @@ metadata:
|
|||||||
selfLink: "5"
|
selfLink: "5"
|
||||||
uid: "7"
|
uid: "7"
|
||||||
spec:
|
spec:
|
||||||
|
acquireTime: "1970-01-01T00:00:02.000000Z"
|
||||||
holderIdentity: "19"
|
holderIdentity: "19"
|
||||||
leaseDurationSeconds: 896585016
|
leaseDurationSeconds: 896585016
|
||||||
leaseTransitions: 1305381319
|
leaseTransitions: 1305381319
|
||||||
|
renewTime: "1970-01-01T00:00:03.000000Z"
|
||||||
|
@ -1380,7 +1380,7 @@
|
|||||||
"updateStrategy": {
|
"updateStrategy": {
|
||||||
"type": "荥ơ'禧ǵŊ)TiD¢ƿ媴h5",
|
"type": "荥ơ'禧ǵŊ)TiD¢ƿ媴h5",
|
||||||
"rollingUpdate": {
|
"rollingUpdate": {
|
||||||
|
"maxUnavailable": 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minReadySeconds": 212061711,
|
"minReadySeconds": 212061711,
|
||||||
|
Binary file not shown.
@ -942,7 +942,8 @@ spec:
|
|||||||
volumePath: "101"
|
volumePath: "101"
|
||||||
templateGeneration: 8027668557984017414
|
templateGeneration: 8027668557984017414
|
||||||
updateStrategy:
|
updateStrategy:
|
||||||
rollingUpdate: {}
|
rollingUpdate:
|
||||||
|
maxUnavailable: 2
|
||||||
type: 荥ơ'禧ǵŊ)TiD¢ƿ媴h5
|
type: 荥ơ'禧ǵŊ)TiD¢ƿ媴h5
|
||||||
status:
|
status:
|
||||||
collisionCount: 2063260600
|
collisionCount: 2063260600
|
||||||
|
@ -1376,7 +1376,8 @@
|
|||||||
"strategy": {
|
"strategy": {
|
||||||
"type": "荥ơ'禧ǵŊ)TiD¢ƿ媴h5",
|
"type": "荥ơ'禧ǵŊ)TiD¢ƿ媴h5",
|
||||||
"rollingUpdate": {
|
"rollingUpdate": {
|
||||||
|
"maxUnavailable": 2,
|
||||||
|
"maxSurge": 3
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minReadySeconds": 212061711,
|
"minReadySeconds": 212061711,
|
||||||
|
Binary file not shown.
@ -43,7 +43,9 @@ spec:
|
|||||||
matchLabels:
|
matchLabels:
|
||||||
74404d5---g8c2-k-91e.y5-g--58----0683-b-w7ld-6cs06xj-x5yv0wm-k18/M_-Nx.N_6-___._-.-W._AAn---v_-5-_8LXj: 6-4_WE-_JTrcd-2.-__E_Sv__26KX_R_.-.Nth._--S_4DA_-5_-4lQ42M--1
|
74404d5---g8c2-k-91e.y5-g--58----0683-b-w7ld-6cs06xj-x5yv0wm-k18/M_-Nx.N_6-___._-.-W._AAn---v_-5-_8LXj: 6-4_WE-_JTrcd-2.-__E_Sv__26KX_R_.-.Nth._--S_4DA_-5_-4lQ42M--1
|
||||||
strategy:
|
strategy:
|
||||||
rollingUpdate: {}
|
rollingUpdate:
|
||||||
|
maxSurge: 3
|
||||||
|
maxUnavailable: 2
|
||||||
type: 荥ơ'禧ǵŊ)TiD¢ƿ媴h5
|
type: 荥ơ'禧ǵŊ)TiD¢ƿ媴h5
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -59,7 +59,8 @@
|
|||||||
{
|
{
|
||||||
"ports": [
|
"ports": [
|
||||||
{
|
{
|
||||||
"protocol": "Ǐ2啗塧ȱ蓿彭聡A3fƻfʣ"
|
"protocol": "Ǐ2啗塧ȱ蓿彭聡A3fƻfʣ",
|
||||||
|
"port": 2
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"from": [
|
"from": [
|
||||||
@ -100,7 +101,8 @@
|
|||||||
{
|
{
|
||||||
"ports": [
|
"ports": [
|
||||||
{
|
{
|
||||||
"protocol": "ɗ"
|
"protocol": "ɗ",
|
||||||
|
"port": 3
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"to": [
|
"to": [
|
||||||
|
Binary file not shown.
@ -32,7 +32,8 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
egress:
|
egress:
|
||||||
- ports:
|
- ports:
|
||||||
- protocol: ɗ
|
- port: 3
|
||||||
|
protocol: ɗ
|
||||||
to:
|
to:
|
||||||
- ipBlock:
|
- ipBlock:
|
||||||
cidr: "51"
|
cidr: "51"
|
||||||
@ -74,7 +75,8 @@ spec:
|
|||||||
matchLabels:
|
matchLabels:
|
||||||
yg--79-e-a74bc-v--0jjy45-17-053.zyyms7-tk1po6c-m61733-x-2v4r--5-xgc3-yz-7-x--c0-w5-6r/78A6.6O: 17_.8CnT
|
yg--79-e-a74bc-v--0jjy45-17-053.zyyms7-tk1po6c-m61733-x-2v4r--5-xgc3-yz-7-x--c0-w5-6r/78A6.6O: 17_.8CnT
|
||||||
ports:
|
ports:
|
||||||
- protocol: Ǐ2啗塧ȱ蓿彭聡A3fƻfʣ
|
- port: 2
|
||||||
|
protocol: Ǐ2啗塧ȱ蓿彭聡A3fƻfʣ
|
||||||
podSelector:
|
podSelector:
|
||||||
matchExpressions:
|
matchExpressions:
|
||||||
- key: p503---477-49p---o61---4fy--9---7--9-9s-0-u5lj2--10pq-0-7-9-2-0/fP81.-.9Vdx.TB_M-H_5_.t..bG0
|
- key: p503---477-49p---o61---4fy--9---7--9-9s-0-u5lj2--10pq-0-7-9-2-0/fP81.-.9Vdx.TB_M-H_5_.t..bG0
|
||||||
|
@ -59,7 +59,8 @@
|
|||||||
{
|
{
|
||||||
"ports": [
|
"ports": [
|
||||||
{
|
{
|
||||||
"protocol": "Ǐ2啗塧ȱ蓿彭聡A3fƻfʣ"
|
"protocol": "Ǐ2啗塧ȱ蓿彭聡A3fƻfʣ",
|
||||||
|
"port": 2
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"from": [
|
"from": [
|
||||||
@ -100,7 +101,8 @@
|
|||||||
{
|
{
|
||||||
"ports": [
|
"ports": [
|
||||||
{
|
{
|
||||||
"protocol": "ɗ"
|
"protocol": "ɗ",
|
||||||
|
"port": 3
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"to": [
|
"to": [
|
||||||
|
Binary file not shown.
@ -32,7 +32,8 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
egress:
|
egress:
|
||||||
- ports:
|
- ports:
|
||||||
- protocol: ɗ
|
- port: 3
|
||||||
|
protocol: ɗ
|
||||||
to:
|
to:
|
||||||
- ipBlock:
|
- ipBlock:
|
||||||
cidr: "51"
|
cidr: "51"
|
||||||
@ -74,7 +75,8 @@ spec:
|
|||||||
matchLabels:
|
matchLabels:
|
||||||
yg--79-e-a74bc-v--0jjy45-17-053.zyyms7-tk1po6c-m61733-x-2v4r--5-xgc3-yz-7-x--c0-w5-6r/78A6.6O: 17_.8CnT
|
yg--79-e-a74bc-v--0jjy45-17-053.zyyms7-tk1po6c-m61733-x-2v4r--5-xgc3-yz-7-x--c0-w5-6r/78A6.6O: 17_.8CnT
|
||||||
ports:
|
ports:
|
||||||
- protocol: Ǐ2啗塧ȱ蓿彭聡A3fƻfʣ
|
- port: 2
|
||||||
|
protocol: Ǐ2啗塧ȱ蓿彭聡A3fƻfʣ
|
||||||
podSelector:
|
podSelector:
|
||||||
matchExpressions:
|
matchExpressions:
|
||||||
- key: p503---477-49p---o61---4fy--9---7--9-9s-0-u5lj2--10pq-0-7-9-2-0/fP81.-.9Vdx.TB_M-H_5_.t..bG0
|
- key: p503---477-49p---o61---4fy--9---7--9-9s-0-u5lj2--10pq-0-7-9-2-0/fP81.-.9Vdx.TB_M-H_5_.t..bG0
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"spec": {
|
"spec": {
|
||||||
|
"minAvailable": 2,
|
||||||
"selector": {
|
"selector": {
|
||||||
"matchLabels": {
|
"matchLabels": {
|
||||||
"8---jop9641lg.p-g8c2-k-912e5-c-e63-n-3n/E9.8ThjT9s-j41-0-6p-JFHn7y-74.-0MUORQQ.N2.3": "68._bQw.-dG6c-.6--_x.--0wmZk1_8._3s_-_Bq.m_4"
|
"8---jop9641lg.p-g8c2-k-912e5-c-e63-n-3n/E9.8ThjT9s-j41-0-6p-JFHn7y-74.-0MUORQQ.N2.3": "68._bQw.-dG6c-.6--_x.--0wmZk1_8._3s_-_Bq.m_4"
|
||||||
@ -54,7 +55,8 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"maxUnavailable": 3
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
"observedGeneration": -6582200896939805980,
|
"observedGeneration": -6582200896939805980,
|
||||||
|
Binary file not shown.
@ -30,6 +30,8 @@ metadata:
|
|||||||
selfLink: "5"
|
selfLink: "5"
|
||||||
uid: "7"
|
uid: "7"
|
||||||
spec:
|
spec:
|
||||||
|
maxUnavailable: 3
|
||||||
|
minAvailable: 2
|
||||||
selector:
|
selector:
|
||||||
matchExpressions:
|
matchExpressions:
|
||||||
- key: p503---477-49p---o61---4fy--9---7--9-9s-0-u5lj2--10pq-0-7-9-2-0/fP81.-.9Vdx.TB_M-H_5_.t..bG0
|
- key: p503---477-49p---o61---4fy--9---7--9-9s-0-u5lj2--10pq-0-7-9-2-0/fP81.-.9Vdx.TB_M-H_5_.t..bG0
|
||||||
|
@ -26,6 +26,7 @@ go_library(
|
|||||||
"//staging/src/k8s.io/apimachinery/pkg/runtime/serializer/json:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/runtime/serializer/json:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
||||||
"//vendor/github.com/davecgh/go-spew/spew:go_default_library",
|
"//vendor/github.com/davecgh/go-spew/spew:go_default_library",
|
||||||
"//vendor/github.com/golang/protobuf/proto:go_default_library",
|
"//vendor/github.com/golang/protobuf/proto:go_default_library",
|
||||||
|
@ -26,6 +26,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/google/go-cmp/cmp"
|
"github.com/google/go-cmp/cmp"
|
||||||
fuzz "github.com/google/gofuzz"
|
fuzz "github.com/google/gofuzz"
|
||||||
@ -39,6 +40,7 @@ import (
|
|||||||
"k8s.io/apimachinery/pkg/runtime/serializer"
|
"k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
"k8s.io/apimachinery/pkg/runtime/serializer/json"
|
"k8s.io/apimachinery/pkg/runtime/serializer/json"
|
||||||
"k8s.io/apimachinery/pkg/runtime/serializer/protobuf"
|
"k8s.io/apimachinery/pkg/runtime/serializer/protobuf"
|
||||||
|
"k8s.io/apimachinery/pkg/util/intstr"
|
||||||
"k8s.io/apimachinery/pkg/util/sets"
|
"k8s.io/apimachinery/pkg/util/sets"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -221,12 +223,30 @@ func CompatibilityTestFuzzer(scheme *runtime.Scheme, fuzzFuncs []interface{}) *f
|
|||||||
fuzzer := fuzz.NewWithSeed(0).NilChance(0).NumElements(1, 1).MaxDepth(20)
|
fuzzer := fuzz.NewWithSeed(0).NilChance(0).NumElements(1, 1).MaxDepth(20)
|
||||||
fuzzer = fuzzer.Funcs(genericfuzzer.Funcs(serializer.NewCodecFactory(scheme))...)
|
fuzzer = fuzzer.Funcs(genericfuzzer.Funcs(serializer.NewCodecFactory(scheme))...)
|
||||||
fuzzString := 1
|
fuzzString := 1
|
||||||
|
fuzzIntOrString := 1
|
||||||
|
fuzzMicroTime := int64(1)
|
||||||
fuzzer.Funcs(
|
fuzzer.Funcs(
|
||||||
// avoid crazy strings
|
// avoid crazy strings
|
||||||
func(s *string, c fuzz.Continue) {
|
func(s *string, c fuzz.Continue) {
|
||||||
fuzzString++
|
fuzzString++
|
||||||
*s = strconv.Itoa(fuzzString)
|
*s = strconv.Itoa(fuzzString)
|
||||||
},
|
},
|
||||||
|
func(i **intstr.IntOrString, c fuzz.Continue) {
|
||||||
|
fuzzIntOrString++
|
||||||
|
tmp := intstr.FromInt(fuzzIntOrString)
|
||||||
|
_ = tmp
|
||||||
|
*i = &tmp
|
||||||
|
},
|
||||||
|
func(t **metav1.MicroTime, c fuzz.Continue) {
|
||||||
|
if t != nil && *t != nil {
|
||||||
|
// use type-defined fuzzing for non-nil objects
|
||||||
|
(*t).Fuzz(c)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
fuzzMicroTime++
|
||||||
|
tmp := metav1.NewMicroTime(time.Unix(fuzzMicroTime, 0))
|
||||||
|
*t = &tmp
|
||||||
|
},
|
||||||
// limit managed fields to two levels
|
// limit managed fields to two levels
|
||||||
func(f *[]metav1.ManagedFieldsEntry, c fuzz.Continue) {
|
func(f *[]metav1.ManagedFieldsEntry, c fuzz.Continue) {
|
||||||
field := metav1.ManagedFieldsEntry{}
|
field := metav1.ManagedFieldsEntry{}
|
||||||
@ -280,20 +300,20 @@ func (c *CompatibilityTestOptions) runCurrentVersionTest(t *testing.T, gvk schem
|
|||||||
} else {
|
} else {
|
||||||
if !bytes.Equal(expectedJSON, actualJSON) {
|
if !bytes.Equal(expectedJSON, actualJSON) {
|
||||||
t.Errorf("json differs")
|
t.Errorf("json differs")
|
||||||
t.Log(cmp.Diff(string(expectedJSON), string(actualJSON)))
|
t.Log(cmp.Diff(string(actualJSON), string(expectedJSON)))
|
||||||
needsUpdate = true
|
needsUpdate = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if !bytes.Equal(expectedYAML, actualYAML) {
|
if !bytes.Equal(expectedYAML, actualYAML) {
|
||||||
t.Errorf("yaml differs")
|
t.Errorf("yaml differs")
|
||||||
t.Log(cmp.Diff(string(expectedYAML), string(actualYAML)))
|
t.Log(cmp.Diff(string(actualYAML), string(expectedYAML)))
|
||||||
needsUpdate = true
|
needsUpdate = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if !bytes.Equal(expectedProto, actualProto) {
|
if !bytes.Equal(expectedProto, actualProto) {
|
||||||
t.Errorf("proto differs")
|
t.Errorf("proto differs")
|
||||||
needsUpdate = true
|
needsUpdate = true
|
||||||
t.Log(cmp.Diff(dumpProto(t, expectedProto[4:]), dumpProto(t, actualProto[4:])))
|
t.Log(cmp.Diff(dumpProto(t, actualProto[4:]), dumpProto(t, expectedProto[4:])))
|
||||||
// t.Logf("json (for locating the offending field based on surrounding data): %s", string(expectedJSON))
|
// t.Logf("json (for locating the offending field based on surrounding data): %s", string(expectedJSON))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user