Move field errors to pkg/util/fielderrors

Allows pkg/api to take a reference to labels.Selector and fields.Selector
This commit is contained in:
Clayton Coleman
2015-03-22 17:40:47 -04:00
parent ef758881d1
commit 65425f690c
21 changed files with 57 additions and 47 deletions

View File

@@ -22,14 +22,15 @@ import (
"time"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/resource"
"github.com/GoogleCloudPlatform/kubernetes/pkg/capabilities"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
utilerrors "github.com/GoogleCloudPlatform/kubernetes/pkg/util/errors"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors"
errors "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors"
)
func expectPrefix(t *testing.T, prefix string, errs errors.ValidationErrorList) {
func expectPrefix(t *testing.T, prefix string, errs fielderrors.ValidationErrorList) {
for i := range errs {
if f, p := errs[i].(*errors.ValidationError).Field, prefix; !strings.HasPrefix(f, p) {
t.Errorf("expected prefix '%s' for field '%s' (%v)", p, f, errs[i])