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

@@ -26,6 +26,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/intstr"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/client-go/rest/fake"
"k8s.io/kubernetes/pkg/api/legacyscheme"
api "k8s.io/kubernetes/pkg/apis/core"
@@ -36,7 +37,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 TestRunExposeService(t *testing.T) {