Update test/e2e for test/e2e/framework refactoring

This commit is contained in:
Tim St. Clair
2016-04-07 10:21:31 -07:00
parent a55b4f2e77
commit b0d3f32e88
88 changed files with 2969 additions and 2887 deletions

View File

@@ -25,20 +25,21 @@ import (
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/apimachinery/registered"
client "k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/test/e2e/framework"
. "github.com/onsi/ginkgo"
)
//TODO : Consolidate this code with the code for emptyDir.
//This will require some smart.
var _ = KubeDescribe("hostPath", func() {
framework := NewDefaultFramework("hostpath")
var _ = framework.KubeDescribe("hostPath", func() {
f := framework.NewDefaultFramework("hostpath")
var c *client.Client
var namespace *api.Namespace
BeforeEach(func() {
c = framework.Client
namespace = framework.Namespace
c = f.Client
namespace = f.Namespace
//cleanup before running the test.
_ = os.Remove("/tmp/test-file")
@@ -55,7 +56,7 @@ var _ = KubeDescribe("hostPath", func() {
fmt.Sprintf("--fs_type=%v", volumePath),
fmt.Sprintf("--file_mode=%v", volumePath),
}
testContainerOutput("hostPath mode", c, pod, 0, []string{
framework.TestContainerOutput("hostPath mode", c, pod, 0, []string{
"mode of file \"/test-volume\": dtrwxrwxrwx", // we expect the sticky bit (mode flag t) to be set for the dir
},
namespace.Name)
@@ -82,7 +83,7 @@ var _ = KubeDescribe("hostPath", func() {
}
//Read the content of the file with the second container to
//verify volumes being shared properly among containers within the pod.
testContainerOutput("hostPath r/w", c, pod, 1, []string{
framework.TestContainerOutput("hostPath r/w", c, pod, 1, []string{
"content of file \"/test-volume/test-file\": mount-tester new file",
}, namespace.Name,
)