divide statically known typer from dynamically derive restmapper

This commit is contained in:
David Eads
2018-04-27 09:27:19 -04:00
parent 6fbcbc994f
commit 5432ef5c45
27 changed files with 47 additions and 75 deletions

View File

@@ -437,7 +437,7 @@ func TestClusterRoleValidate(t *testing.T) {
for name, test := range tests {
t.Run(name, func(t *testing.T) {
test.clusterRoleOptions.Mapper, _ = tf.Object()
test.clusterRoleOptions.Mapper = tf.RESTMapper()
err := test.clusterRoleOptions.Validate()
if test.expectErr && err == nil {
t.Errorf("%s: expect error happens, but validate passes.", name)