Change:
updatedDefaultClass1.GlobalDefault = false tests := []struct { <del> name                  string classesBefore         []*scheduling.PriorityClass classesAfter          []*scheduling.PriorityClass attributes            admission.Attributes expectedDefaultBefore int32 expectedDefaultAfter  int32 </del> <ins> name                      string classesBefore             []*scheduling.PriorityClass classesAfter              []*scheduling.PriorityClass attributes                admission.Attributes expectedDefaultBefore     int32 expectedDefaultNameBefore string expectedDefaultAfter      int32 expectedDefaultNameAfter  string </ins> }{ { <del> name:                  "simple resolution with a default class", classesBefore:         []*scheduling.PriorityClass{defaultClass1}, classesAfter:          []*scheduling.PriorityClass{defaultClass1}, attributes:            nil, expectedDefaultBefore: defaultClass1.Value, expectedDefaultAfter:  defaultClass1.Value, }, { name:                  "add a default class", classesBefore:         []*scheduling.PriorityClass{nondefaultClass1}, classesAfter:          []*scheduling.PriorityClass{nondefaultClass1, defaultClass1}, attributes:            admission.NewAttributesRecord(defaultClass1, nil, pcKind, "", defaultClass1.Name, pcResource, "", admission.Create, false, nil), expectedDefaultBefore: scheduling.DefaultPriorityWhenNoDefaultClassExists, expectedDefaultAfter:  defaultClass1.Value, }, { name:                  "multiple default classes resolves to the minimum value among them", classesBefore:         []*scheduling.PriorityClass{defaultClass1, defaultClass2}, classesAfter:          []*scheduling.PriorityClass{defaultClass2}, attributes:            admission.NewAttributesRecord(nil, nil, pcKind, "", defaultClass1.Name, pcResource, "", admission.Delete, false, nil), expectedDefaultBefore: defaultClass1.Value, expectedDefaultAfter:  defaultClass2.Value, }, { name:                  "delete default priority class", classesBefore:         []*scheduling.PriorityClass{defaultClass1}, classesAfter:          []*scheduling.PriorityClass{}, attributes:            admission.NewAttributesRecord(nil, nil, pcKind, "", defaultClass1.Name, pcResource, "", admission.Delete, false, nil), expectedDefaultBefore: defaultClass1.Value, expectedDefaultAfter:  scheduling.DefaultPriorityWhenNoDefaultClassExists, }, { name:                  "update default class and remove its global default", classesBefore:         []*scheduling.PriorityClass{defaultClass1}, classesAfter:          []*scheduling.PriorityClass{&updatedDefaultClass1}, attributes:            admission.NewAttributesRecord(&updatedDefaultClass1, defaultClass1, pcKind, "", defaultClass1.Name, pcResource, "", admission.Update, false, nil), expectedDefaultBefore: defaultClass1.Value, expectedDefaultAfter:  scheduling.DefaultPriorityWhenNoDefaultClassExists, </del> <ins> name:                      "simple resolution with a default class", classesBefore:             []*scheduling.PriorityClass{defaultClass1}, classesAfter:              []*scheduling.PriorityClass{defaultClass1}, attributes:                nil, expectedDefaultBefore:     defaultClass1.Value, expectedDefaultNameBefore: defaultClass1.Name, expectedDefaultAfter:      defaultClass1.Value, expectedDefaultNameAfter:  defaultClass1.Name, }, { name:                      "add a default class", classesBefore:             []*scheduling.PriorityClass{nondefaultClass1}, classesAfter:              []*scheduling.PriorityClass{nondefaultClass1, defaultClass1}, attributes:                admission.NewAttributesRecord(defaultClass1, nil, pcKind, "", defaultClass1.Name, pcResource, "", admission.Create, false, nil), expectedDefaultBefore:     scheduling.DefaultPriorityWhenNoDefaultClassExists, expectedDefaultNameBefore: "", expectedDefaultAfter:      defaultClass1.Value, expectedDefaultNameAfter:  defaultClass1.Name, }, { name:                      "multiple default classes resolves to the minimum value among them", classesBefore:             []*scheduling.PriorityClass{defaultClass1, defaultClass2}, classesAfter:              []*scheduling.PriorityClass{defaultClass2}, attributes:                admission.NewAttributesRecord(nil, nil, pcKind, "", defaultClass1.Name, pcResource, "", admission.Delete, false, nil), expectedDefaultBefore:     defaultClass1.Value, expectedDefaultNameBefore: defaultClass1.Name, expectedDefaultAfter:      defaultClass2.Value, expectedDefaultNameAfter:  defaultClass2.Name, }, { name:                      "delete default priority class", classesBefore:             []*scheduling.PriorityClass{defaultClass1}, classesAfter:              []*scheduling.PriorityClass{}, attributes:                admission.NewAttributesRecord(nil, nil, pcKind, "", defaultClass1.Name, pcResource, "", admission.Delete, false, nil), expectedDefaultBefore:     defaultClass1.Value, expectedDefaultNameBefore: defaultClass1.Name, expectedDefaultAfter:      scheduling.DefaultPriorityWhenNoDefaultClassExists, expectedDefaultNameAfter:  "", }, { name:                      "update default class and remove its global default", classesBefore:             []*scheduling.PriorityClass{defaultClass1}, classesAfter:              []*scheduling.PriorityClass{&updatedDefaultClass1}, attributes:                admission.NewAttributesRecord(&updatedDefaultClass1, defaultClass1, pcKind, "", defaultClass1.Name, pcResource, "", admission.Update, false, nil), expectedDefaultBefore:     defaultClass1.Value, expectedDefaultNameBefore: defaultClass1.Name, expectedDefaultAfter:      scheduling.DefaultPriorityWhenNoDefaultClassExists, expectedDefaultNameAfter:  "", </ins> }, }

Discussion:
Is this a BUG REPORT or FEATURE REQUEST?: /kind cleanup /sig scheduling Description: If Pod did not set , admission controller will set to "default value". If the default value are from default priority class, it's better to also set of pod.
can I take this? /assign
, thanks :) I created a PR for functionality, but that'll be great if you can help add some e2e test for it. I can help to shepherd :)
thanks let me have a try :)