Skip to content
Permalink
Browse files

updates NFS server image to 0.6, per #22529

fix persistent_volume e2e test: test cleanup doesn't expect client pod; delete PV after test

Signed-off-by: Huamin Chen <hchen@redhat.com>
  • Loading branch information...
rootfs committed Apr 12, 2016
1 parent 0564984 commit 08c8300572c35cdf6f047caa8caae32a98fc0864
Showing with 21 additions and 3 deletions.
  1. +20 −2 test/e2e/persistent_volumes.go
  2. +1 −1 test/e2e/volumes.go
@@ -28,6 +28,20 @@ import (
client "k8s.io/kubernetes/pkg/client/unversioned"
)

// Clean both server and client pods.
func persistentVolumeTestCleanup(client *client.Client, config VolumeTestConfig) {
defer GinkgoRecover()

podClient := client.Pods(config.namespace)

if config.serverImage != "" {
err := podClient.Delete(config.prefix+"-server", nil)
if err != nil {
expectNoError(err, "Failed to delete server pod: %v", err)
}
}
}

// This test needs privileged containers, which are disabled by default. Run
// the test with "go run hack/e2e.go ... --ginkgo.focus=[Feature:Volumes]"
var _ = KubeDescribe("PersistentVolumes [Feature:Volumes]", func() {
@@ -44,12 +58,12 @@ var _ = KubeDescribe("PersistentVolumes [Feature:Volumes]", func() {
config := VolumeTestConfig{
namespace: ns,
prefix: "nfs",
serverImage: "gcr.io/google_containers/volume-nfs:0.4",
serverImage: "gcr.io/google_containers/volume-nfs:0.6",
serverPorts: []int{2049},
}

defer func() {
volumeTestCleanup(c, config)
persistentVolumeTestCleanup(c, config)
}()

pod := startVolumeServer(c, config)
@@ -96,6 +110,10 @@ var _ = KubeDescribe("PersistentVolumes [Feature:Volumes]", func() {
expectNoError(err, "Failed to create checker pod: %v", err)
err = waitForPodSuccessInNamespace(c, checkpod.Name, checkpod.Spec.Containers[0].Name, checkpod.Namespace)
Expect(err).NotTo(HaveOccurred())
// must delete PV, otherwise the PV is available and next time a PVC may bind to it and cause new PV fails to bind
Logf("Deleting PersistentVolume")
err = c.PersistentVolumes().Delete(pv.Name)
Expect(err).NotTo(HaveOccurred())
})
})

@@ -364,7 +364,7 @@ var _ = KubeDescribe("Volumes [Feature:Volumes]", func() {
config := VolumeTestConfig{
namespace: namespace.Name,
prefix: "nfs",
serverImage: "gcr.io/google_containers/volume-nfs:0.4",
serverImage: "gcr.io/google_containers/volume-nfs:0.6",
serverPorts: []int{2049},
}

1 comment on commit 08c8300

@k8s-teamcity-mesosphere

This comment has been minimized.

Copy link

k8s-teamcity-mesosphere commented on 08c8300 Apr 12, 2016

TeamCity OSS :: Kubernetes Mesos :: 4 - Smoke Tests Build 21181 outcome was SUCCESS
Summary: Tests passed: 1, ignored: 273 Build time: 00:07:22

Please sign in to comment.
You can’t perform that action at this time.