mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Stop skipping APIService in apply test
This commit is contained in:
parent
d33c12bb69
commit
0f6873c025
@ -60,15 +60,7 @@ var statusData = map[schema.GroupVersionResource]string{
|
|||||||
gvr("internal.apiserver.k8s.io", "v1alpha1", "storageversions"): `{"status": {"commonEncodingVersion":"v1","storageVersions":[{"apiServerID":"1","decodableVersions":["v1","v2"],"encodingVersion":"v1"}],"conditions":[{"type":"AllEncodingVersionsEqual","status":"True","lastTransitionTime":"2020-01-01T00:00:00Z","reason":"allEncodingVersionsEqual","message":"all encoding versions are set to v1"}]}}`,
|
gvr("internal.apiserver.k8s.io", "v1alpha1", "storageversions"): `{"status": {"commonEncodingVersion":"v1","storageVersions":[{"apiServerID":"1","decodableVersions":["v1","v2"],"encodingVersion":"v1"}],"conditions":[{"type":"AllEncodingVersionsEqual","status":"True","lastTransitionTime":"2020-01-01T00:00:00Z","reason":"allEncodingVersionsEqual","message":"all encoding versions are set to v1"}]}}`,
|
||||||
}
|
}
|
||||||
|
|
||||||
const statusDefault = `{"status": {"conditions": [{"type": "MyStatus", "status":"true"}]}}`
|
const statusDefault = `{"status": {"conditions": [{"type": "MyStatus", "status":"True"}]}}`
|
||||||
|
|
||||||
// DO NOT ADD TO THIS LIST.
|
|
||||||
// This list is used to ignore known bugs. We shouldn't introduce new bugs.
|
|
||||||
var ignoreList = map[schema.GroupVersionResource]struct{}{
|
|
||||||
// TODO(#89264): apiservices doesn't work because the openapi is not routed properly.
|
|
||||||
gvr("apiregistration.k8s.io", "v1beta1", "apiservices"): {},
|
|
||||||
gvr("apiregistration.k8s.io", "v1", "apiservices"): {},
|
|
||||||
}
|
|
||||||
|
|
||||||
// Some status-only APIs have empty object on creation. Therefore we don't expect create_test
|
// Some status-only APIs have empty object on creation. Therefore we don't expect create_test
|
||||||
// managedFields for these APIs
|
// managedFields for these APIs
|
||||||
@ -146,9 +138,6 @@ func TestApplyStatus(t *testing.T) {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
t.Run(mapping.Resource.String(), func(t *testing.T) {
|
t.Run(mapping.Resource.String(), func(t *testing.T) {
|
||||||
if _, ok := ignoreList[mapping.Resource]; ok {
|
|
||||||
t.Skip()
|
|
||||||
}
|
|
||||||
status, ok := statusData[mapping.Resource]
|
status, ok := statusData[mapping.Resource]
|
||||||
if !ok {
|
if !ok {
|
||||||
status = statusDefault
|
status = statusDefault
|
||||||
|
Loading…
Reference in New Issue
Block a user