Add secret volume plugin and e2e test
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user