v1beta3 Pod refactor

This commit is contained in:
markturansky
2014-11-13 10:52:13 -05:00
parent df0981bc01
commit 8af4ccb111
36 changed files with 569 additions and 573 deletions

View File

@@ -79,24 +79,22 @@ func TestClient(t *testing.T) {
// get a validation error
pod := &api.Pod{
DesiredState: api.PodState{
Manifest: api.ContainerManifest{
Version: "v1beta2",
Containers: []api.Container{
{
Name: "test",
},
Spec: api.PodSpec{
Containers: []api.Container{
{
Name: "test",
},
},
},
}
got, err := client.Pods(ns).Create(pod)
if err == nil {
t.Fatalf("unexpected non-error: %v", err)
t.Fatalf("unexpected non-error: %v", got)
}
// get a created pod
pod.DesiredState.Manifest.Containers[0].Image = "an-image"
pod.Spec.Containers[0].Image = "an-image"
got, err = client.Pods(ns).Create(pod)
if err != nil {
t.Fatalf("unexpected error: %v", err)
@@ -117,7 +115,7 @@ func TestClient(t *testing.T) {
if actual.Name != got.Name {
t.Errorf("expected pod %#v, got %#v", got, actual)
}
if actual.CurrentState.Host != "" {
if actual.Status.Host != "" {
t.Errorf("expected pod to be unscheduled, got %#v", actual)
}
}