mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-13 10:39:07 +00:00
refactoring latest.go GroupVersion;
clean up latest.go GroupVersions; remove latest.GroupMeta.Group; remove latest.GroupMeta.Version.
This commit is contained in:
@@ -16,7 +16,11 @@ limitations under the License.
|
||||
|
||||
package latest
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
)
|
||||
|
||||
func TestAllPreferredGroupVersions(t *testing.T) {
|
||||
testCases := []struct {
|
||||
@@ -26,13 +30,13 @@ func TestAllPreferredGroupVersions(t *testing.T) {
|
||||
{
|
||||
groupMetaMap: GroupMetaMap{
|
||||
"group1": &GroupMeta{
|
||||
GroupVersion: "group1/v1",
|
||||
GroupVersion: unversioned.GroupVersion{"group1", "v1"},
|
||||
},
|
||||
"group2": &GroupMeta{
|
||||
GroupVersion: "group2/v2",
|
||||
GroupVersion: unversioned.GroupVersion{"group2", "v2"},
|
||||
},
|
||||
"": &GroupMeta{
|
||||
GroupVersion: "v1",
|
||||
GroupVersion: unversioned.GroupVersion{"", "v1"},
|
||||
},
|
||||
},
|
||||
expect: "group1/v1,group2/v2,v1",
|
||||
@@ -40,7 +44,7 @@ func TestAllPreferredGroupVersions(t *testing.T) {
|
||||
{
|
||||
groupMetaMap: GroupMetaMap{
|
||||
"": &GroupMeta{
|
||||
GroupVersion: "v1",
|
||||
GroupVersion: unversioned.GroupVersion{"", "v1"},
|
||||
},
|
||||
},
|
||||
expect: "v1",
|
||||
|
Reference in New Issue
Block a user