Add secret volume plugin and e2e test

This commit is contained in:
Paul Morie
2015-02-17 20:26:41 -05:00
parent afefa85b26
commit a42ff94c8f
18 changed files with 539 additions and 24 deletions

View File

@@ -21,12 +21,14 @@ import (
"path"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
"github.com/GoogleCloudPlatform/kubernetes/pkg/types"
)
// FakeHost is useful for testing volume plugins.
type FakeHost struct {
RootDir string
RootDir string
KubeClient client.Interface
}
func (f *FakeHost) GetPluginDir(podUID string) string {
@@ -41,6 +43,10 @@ func (f *FakeHost) GetPodPluginDir(podUID types.UID, pluginName string) string {
return path.Join(f.RootDir, "pods", string(podUID), "plugins", pluginName)
}
func (f *FakeHost) GetKubeClient() client.Interface {
return f.KubeClient
}
// FakePlugin is useful for for testing. It tries to be a fully compliant
// plugin, but all it does is make empty directories.
// Use as: