Make a secret factory.

This commit is contained in:
Jeffrey Regan
2018-07-20 09:01:37 -07:00
parent 0197c019cc
commit 276693cf0e
9 changed files with 32 additions and 23 deletions

View File

@@ -46,9 +46,9 @@ type ConfigMapFactory struct {
// NewConfigMapFactory returns a new ConfigMapFactory.
func NewConfigMapFactory(
args *types.ConfigMapArgs,
fSys fs.FileSystem,
l loader.Loader) *ConfigMapFactory {
return &ConfigMapFactory{args: args, fSys: fSys, ldr: l}
l loader.Loader,
fSys fs.FileSystem) *ConfigMapFactory {
return &ConfigMapFactory{args: args, ldr: l, fSys: fSys}
}
// MakeUnstructAndGenerateName returns an configmap and the name appended with a hash.

View File

@@ -136,7 +136,7 @@ func TestConstructConfigMap(t *testing.T) {
for _, tc := range testCases {
// TODO: all tests should use a FakeFs
fSys := fs.MakeRealFS()
f := NewConfigMapFactory(&tc.input, fSys, nil)
f := NewConfigMapFactory(&tc.input, nil, fSys)
cm, err := f.MakeConfigMap1()
if err != nil {
t.Fatalf("unexpected error: %v", err)