Fix problems with local volumes to configmap

- make it possible to mount only one file as configmap
- remove "dots" from path to convert it to volume name
- see #11 that can be resolved
This commit is contained in:
2022-05-23 11:13:42 +02:00
parent 1e8fd44857
commit 63afc3066b
3 changed files with 22 additions and 3 deletions

14
generator/utils_test.go Normal file
View File

@@ -0,0 +1,14 @@
package generator
import (
"katenary/compose"
"testing"
)
func Test_PathToName(t *testing.T) {
path := compose.GetCurrentDir() + "/envéfoo.file"
name := PathToName(path)
if name != "env-foo-file" {
t.Error("Expected env-foo-file, got ", name)
}
}