Merge pull request #46265 from waseem/printers-genericity

Automatic merge from submit-queue (batch tested with PRs 41563, 45251, 46265, 46462, 46721)

Denote if a printer is generic.

This fixes #38779.

This allows us to avoid case in which printers.GetStandardPrinter
returns nil for both printer and err removing any potential panics that
may arise throughout kubectl commands.

Please see #38779 and #38112 for complete context.
This commit is contained in:
Kubernetes Submit Queue
2017-06-02 19:53:40 -07:00
committed by GitHub
24 changed files with 182 additions and 96 deletions

View File

@@ -46,6 +46,10 @@ func (t *testClusterRolePrinter) HandledResources() []string {
return []string{}
}
func (t *testClusterRolePrinter) IsGeneric() bool {
return true
}
func TestCreateClusterRole(t *testing.T) {
clusterRoleName := "my-cluster-role"