Add skipUnlessNodeOS is GCI

pull/6/head
Jon Cope 2017-04-04 14:48:51 -05:00
parent cef9edcdee
commit ecca32641f
3 changed files with 14 additions and 3 deletions

View File

@ -37,6 +37,9 @@ limitations under the License.
* and checks, that Kubernetes can use it as a volume. * and checks, that Kubernetes can use it as a volume.
*/ */
// GlusterFS test is duplicated from test/e2e/volumes.go. Any changes made there
// should be duplicated here
package common package common
import ( import (
@ -130,7 +133,7 @@ var _ = framework.KubeDescribe("GCP Volumes", func() {
Volume: v1.VolumeSource{ Volume: v1.VolumeSource{
NFS: &v1.NFSVolumeSource{ NFS: &v1.NFSVolumeSource{
Server: serverIP, Server: serverIP,
Path: "/", Path: "/exports",
ReadOnly: true, ReadOnly: true,
}, },
}, },
@ -149,6 +152,8 @@ var _ = framework.KubeDescribe("GCP Volumes", func() {
framework.KubeDescribe("GlusterFS", func() { framework.KubeDescribe("GlusterFS", func() {
It("should be mountable [Volume]", func() { It("should be mountable [Volume]", func() {
framework.SkipUnlessNodeOSDistroIs("gci")
config := framework.VolumeTestConfig{ config := framework.VolumeTestConfig{
Namespace: namespace.Name, Namespace: namespace.Name,
Prefix: "gluster", Prefix: "gluster",
@ -161,6 +166,7 @@ var _ = framework.KubeDescribe("GCP Volumes", func() {
framework.VolumeTestCleanup(f, config) framework.VolumeTestCleanup(f, config)
} }
}() }()
pod := framework.StartVolumeServer(c, config) pod := framework.StartVolumeServer(c, config)
serverIP := pod.Status.PodIP serverIP := pod.Status.PodIP
framework.Logf("Gluster server IP address: %v", serverIP) framework.Logf("Gluster server IP address: %v", serverIP)

View File

@ -182,7 +182,6 @@ func StartVolumeServer(client clientset.Interface, config VolumeTestConfig) *v1.
pod, err = podClient.Get(serverPodName, metav1.GetOptions{}) pod, err = podClient.Get(serverPodName, metav1.GetOptions{})
ExpectNoError(err, "Cannot locate the server pod %q: %v", serverPodName, err) ExpectNoError(err, "Cannot locate the server pod %q: %v", serverPodName, err)
} }
return pod return pod
} }

View File

@ -37,6 +37,9 @@ limitations under the License.
* and checks, that Kubernetes can use it as a volume. * and checks, that Kubernetes can use it as a volume.
*/ */
// test/e2e/common/volumes.go duplicates the GlusterFS test from this file. Any changes made to this
// test should be made there as well.
package e2e package e2e
import ( import (
@ -76,7 +79,7 @@ func DeleteCinderVolume(name string) error {
} }
// These tests need privileged containers, which are disabled by default. // These tests need privileged containers, which are disabled by default.
var _ = framework.KubeDescribe("Volumes [Volume][Volume]", func() { var _ = framework.KubeDescribe("Volumes [Volume]", func() {
f := framework.NewDefaultFramework("volume") f := framework.NewDefaultFramework("volume")
// If 'false', the test won't clear its volumes upon completion. Useful for debugging, // If 'false', the test won't clear its volumes upon completion. Useful for debugging,
@ -137,6 +140,9 @@ var _ = framework.KubeDescribe("Volumes [Volume][Volume]", func() {
framework.KubeDescribe("GlusterFS [Feature:Volumes]", func() { framework.KubeDescribe("GlusterFS [Feature:Volumes]", func() {
It("should be mountable", func() { It("should be mountable", func() {
//TODO (copejon) GFS is not supported on debian image.
framework.SkipUnlessNodeOSDistroIs("gci")
config := framework.VolumeTestConfig{ config := framework.VolumeTestConfig{
Namespace: namespace.Name, Namespace: namespace.Name,
Prefix: "gluster", Prefix: "gluster",