Job controller logic

This commit is contained in:
Maciej Szulik
2015-08-27 14:19:35 +02:00
parent bdec7da47b
commit 8cefa2ee55
16 changed files with 1268 additions and 67 deletions

View File

@@ -180,7 +180,7 @@ func TestControllerExpectations(t *testing.T) {
}
}
func TestCreateReplica(t *testing.T) {
func TestCreatePods(t *testing.T) {
ns := api.NamespaceDefault
body := runtime.EncodeOrDie(testapi.Default.Codec(), &api.Pod{ObjectMeta: api.ObjectMeta{Name: "empty_pod"}})
fakeHandler := util.FakeHandler{
@@ -199,7 +199,7 @@ func TestCreateReplica(t *testing.T) {
controllerSpec := newReplicationController(1)
// Make sure createReplica sends a POST to the apiserver with a pod from the controllers pod template
podControl.CreateReplica(ns, controllerSpec)
podControl.CreatePods(ns, controllerSpec.Spec.Template, controllerSpec)
expectedPod := api.Pod{
ObjectMeta: api.ObjectMeta{