mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 16:06:51 +00:00
refactor testapi and test scripts to prepare for multiple API groups.
This commit is contained in:
@@ -512,7 +512,7 @@ func TestResourceByNameAndEmptySelector(t *testing.T) {
|
||||
|
||||
func TestSelector(t *testing.T) {
|
||||
pods, svc := testData()
|
||||
labelKey := api.LabelSelectorQueryParam(testapi.Version())
|
||||
labelKey := api.LabelSelectorQueryParam(testapi.Default.Version())
|
||||
b := NewBuilder(latest.RESTMapper, api.Scheme, fakeClientWith("", t, map[string]string{
|
||||
"/namespaces/test/pods?" + labelKey + "=a%3Db": runtime.EncodeOrDie(latest.Codec, pods),
|
||||
"/namespaces/test/services?" + labelKey + "=a%3Db": runtime.EncodeOrDie(latest.Codec, svc),
|
||||
@@ -808,7 +808,7 @@ func TestSingularRootScopedObject(t *testing.T) {
|
||||
|
||||
func TestListObject(t *testing.T) {
|
||||
pods, _ := testData()
|
||||
labelKey := api.LabelSelectorQueryParam(testapi.Version())
|
||||
labelKey := api.LabelSelectorQueryParam(testapi.Default.Version())
|
||||
b := NewBuilder(latest.RESTMapper, api.Scheme, fakeClientWith("", t, map[string]string{
|
||||
"/namespaces/test/pods?" + labelKey + "=a%3Db": runtime.EncodeOrDie(latest.Codec, pods),
|
||||
})).
|
||||
@@ -841,7 +841,7 @@ func TestListObject(t *testing.T) {
|
||||
|
||||
func TestListObjectWithDifferentVersions(t *testing.T) {
|
||||
pods, svc := testData()
|
||||
labelKey := api.LabelSelectorQueryParam(testapi.Version())
|
||||
labelKey := api.LabelSelectorQueryParam(testapi.Default.Version())
|
||||
obj, err := NewBuilder(latest.RESTMapper, api.Scheme, fakeClientWith("", t, map[string]string{
|
||||
"/namespaces/test/pods?" + labelKey + "=a%3Db": runtime.EncodeOrDie(latest.Codec, pods),
|
||||
"/namespaces/test/services?" + labelKey + "=a%3Db": runtime.EncodeOrDie(latest.Codec, svc),
|
||||
|
||||
Reference in New Issue
Block a user