Add missing error handling in schema-related code

This commit is contained in:
Mikhail Mazurskiy
2018-06-03 14:59:58 +10:00
parent 3079c1df2f
commit bfe313d5f3
73 changed files with 208 additions and 119 deletions

View File

@@ -33,6 +33,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
restclient "k8s.io/client-go/rest"
"k8s.io/kubernetes/pkg/api/testapi"
apitesting "k8s.io/kubernetes/pkg/api/testing"
@@ -43,7 +44,7 @@ import (
// This init should be removed after switching this command and its tests to user external types.
func init() {
api.AddToScheme(scheme.Scheme)
utilruntime.Must(api.AddToScheme(scheme.Scheme))
}
func initTestErrorHandler(t *testing.T) {