make the meaning of a test in get_test.go clearer

This commit is contained in:
Chao Xu
2015-06-05 13:55:33 -07:00
parent 8a4dffdcee
commit e6ffa5bf67
2 changed files with 29 additions and 22 deletions

View File

@@ -66,7 +66,8 @@ func newExternalScheme() (*runtime.Scheme, meta.RESTMapper, runtime.Codec) {
scheme := runtime.NewScheme()
scheme.AddKnownTypeWithName("", "Type", &internalType{})
scheme.AddKnownTypeWithName("unlikelyversion", "Type", &externalType{})
scheme.AddKnownTypeWithName("v1beta1", "Type", &ExternalType2{})
//This tests that kubectl will not confuse the external scheme with the internal scheme, even when they accidentally have versions of the same name.
scheme.AddKnownTypeWithName(testapi.Version(), "Type", &ExternalType2{})
codec := runtime.CodecFor(scheme, "unlikelyversion")
validVersion := testapi.Version()