diff --git a/discovery/discovery_client_test.go b/discovery/discovery_client_test.go index 043ce67d..22f01e07 100644 --- a/discovery/discovery_client_test.go +++ b/discovery/discovery_client_test.go @@ -617,8 +617,8 @@ func TestServerPreferredNamespacedResources(t *testing.T) { w.Write(output) }, expected: map[schema.GroupVersionResource]struct{}{ - schema.GroupVersionResource{Group: "", Version: "v1", Resource: "pods"}: {}, - schema.GroupVersionResource{Group: "", Version: "v1", Resource: "services"}: {}, + {Group: "", Version: "v1", Resource: "pods"}: {}, + {Group: "", Version: "v1", Resource: "services"}: {}, }, }, { @@ -660,8 +660,8 @@ func TestServerPreferredNamespacedResources(t *testing.T) { w.Write(output) }, expected: map[schema.GroupVersionResource]struct{}{ - schema.GroupVersionResource{Group: "batch", Version: "v1", Resource: "jobs"}: {}, - schema.GroupVersionResource{Group: "batch", Version: "v2alpha1", Resource: "cronjobs"}: {}, + {Group: "batch", Version: "v1", Resource: "jobs"}: {}, + {Group: "batch", Version: "v2alpha1", Resource: "cronjobs"}: {}, }, }, { @@ -703,8 +703,8 @@ func TestServerPreferredNamespacedResources(t *testing.T) { w.Write(output) }, expected: map[schema.GroupVersionResource]struct{}{ - schema.GroupVersionResource{Group: "batch", Version: "v2alpha1", Resource: "jobs"}: {}, - schema.GroupVersionResource{Group: "batch", Version: "v2alpha1", Resource: "cronjobs"}: {}, + {Group: "batch", Version: "v2alpha1", Resource: "jobs"}: {}, + {Group: "batch", Version: "v2alpha1", Resource: "cronjobs"}: {}, }, }, } diff --git a/tools/cache/controller_test.go b/tools/cache/controller_test.go index 56a48c0d..f8e6cec5 100644 --- a/tools/cache/controller_test.go +++ b/tools/cache/controller_test.go @@ -307,13 +307,13 @@ func TestUpdate(t *testing.T) { // asynchronous, there are a lot of valid possibilities. type pair struct{ from, to string } allowedTransitions := map[pair]bool{ - pair{FROM, TO}: true, + {FROM, TO}: true, // Because a resync can happen when we've already observed one // of the above but before the item is deleted. - pair{TO, TO}: true, + {TO, TO}: true, // Because a resync could happen before we observe an update. - pair{FROM, FROM}: true, + {FROM, FROM}: true, } pod := func(name, check string, final bool) *v1.Pod {