move experimental/v1 to experimental/v1alpha1;

use "group/version" in many places where used to expect "version" only.
This commit is contained in:
Chao Xu
2015-09-16 22:15:05 -07:00
parent a518a27354
commit ae1293418b
53 changed files with 750 additions and 450 deletions

View File

@@ -125,3 +125,31 @@ func TestValid(t *testing.T) {
}
}
}
func TestVersionRegex(t *testing.T) {
testCases := []struct {
typeName string
match bool
}{
{
typeName: "v1.Binding",
match: true,
},
{
typeName: "v1alpha1.Binding",
match: true,
},
{
typeName: "Binding",
match: false,
},
}
for _, test := range testCases {
if versionRegexp.MatchString(test.typeName) && !test.match {
t.Errorf("unexpected error: expect %s not to match the regular expression", test.typeName)
}
if !versionRegexp.MatchString(test.typeName) && test.match {
t.Errorf("unexpected error: expect %s to match the regular expression", test.typeName)
}
}
}