diff --git a/pkg/client/client_test.go b/pkg/client/client_test.go index 2a2fbaa0b3f..46809e93c17 100644 --- a/pkg/client/client_test.go +++ b/pkg/client/client_test.go @@ -89,7 +89,7 @@ func (c *testClient) Validate(t *testing.T, received runtime.Object, err error) c.ValidateCommon(t, err) if c.Response.Body != nil && !reflect.DeepEqual(c.Response.Body, received) { - t.Errorf("bad response for request %#v: expected %s, got %s", c.Request, c.Response.Body, received) + t.Errorf("bad response for request %#v: expected %#v, got %#v", c.Request, c.Response.Body, received) } } @@ -97,7 +97,7 @@ func (c *testClient) ValidateRaw(t *testing.T, received []byte, err error) { c.ValidateCommon(t, err) if c.Response.Body != nil && !reflect.DeepEqual(c.Response.Body, received) { - t.Errorf("bad response for request %#v: expected %s, got %s", c.Request, c.Response.Body, received) + t.Errorf("bad response for request %#v: expected %#v, got %#v", c.Request, c.Response.Body, received) } } diff --git a/pkg/controller/replication_controller.go b/pkg/controller/replication_controller.go index a6d5e8c5f98..7481e74f93f 100644 --- a/pkg/controller/replication_controller.go +++ b/pkg/controller/replication_controller.go @@ -66,6 +66,10 @@ func (r RealPodControl) createReplica(namespace string, controller api.Replicati glog.Errorf("Unable to convert pod template: %v", err) return } + if labels.Set(pod.Labels).AsSelector().Empty() { + glog.Errorf("Unable to create pod replica, no labels") + return + } if _, err := r.kubeClient.Pods(namespace).Create(pod); err != nil { glog.Errorf("Unable to create pod replica: %v", err) }