diff --git a/docs/devel/testing.md b/docs/devel/testing.md index dc6a8bd7e2d..25d955dc5f8 100644 --- a/docs/devel/testing.md +++ b/docs/devel/testing.md @@ -141,7 +141,7 @@ is [table driven testing](https://github.com/golang/go/wiki/TableDrivenTests) - Example: [TestNamespaceAuthorization](../../test/integration/auth_test.go) * Integration tests must run in parallel - Each test should create its own master, httpserver and config. - - Example: [TestPodUpdateActiveDeadlineSeconds](../../test/integration/pods.go) + - Example: [TestPodUpdateActiveDeadlineSeconds](../../test/integration/pods_test.go) * See [coding conventions](coding-conventions.md). ### Install etcd dependency diff --git a/test/integration/pods.go b/test/integration/pods_test.go similarity index 96% rename from test/integration/pods.go rename to test/integration/pods_test.go index 4ac98b50803..beff9d335be 100644 --- a/test/integration/pods.go +++ b/test/integration/pods_test.go @@ -59,7 +59,7 @@ func TestPodUpdateActiveDeadlineSeconds(t *testing.T) { prototypePod := func() *api.Pod { return &api.Pod{ ObjectMeta: api.ObjectMeta{ - Name: "XXX", + Name: "xxx", }, Spec: api.PodSpec{ Containers: []api.Container{ @@ -87,7 +87,7 @@ func TestPodUpdateActiveDeadlineSeconds(t *testing.T) { { name: "no change, set", original: &i30, - update: &i60, + update: &i30, valid: true, }, { @@ -120,17 +120,12 @@ func TestPodUpdateActiveDeadlineSeconds(t *testing.T) { update: &iNeg, valid: false, }, + // zero is not allowed, must be a positive integer { name: "change to zero from positive", original: &i30, update: &iZero, - valid: true, - }, - { - name: "change to zero from nil", - original: nil, - update: &iZero, - valid: true, + valid: false, }, { name: "change to nil from positive", @@ -182,7 +177,7 @@ func TestPodReadOnlyFilesystem(t *testing.T) { pod := &api.Pod{ ObjectMeta: api.ObjectMeta{ - Name: "XXX", + Name: "xxx", }, Spec: api.PodSpec{ Containers: []api.Container{