Handling Volume at early stage

It will resolve #544 as well as refactor volume handling part.
This commit is contained in:
Suraj Narwade
2017-07-26 19:59:05 +05:30
parent be17e101b9
commit d5a5f42d8b
15 changed files with 1161 additions and 140 deletions
+3 -2
View File
@@ -42,7 +42,7 @@ func newServiceConfig() kobject.ServiceConfig {
Command: []string{"cmd"},
WorkingDir: "dir",
Args: []string{"arg1", "arg2"},
Volumes: []string{"/tmp/volume"},
VolList: []string{"/tmp/volume"},
Network: []string{"network1", "network2"}, // not supported
Labels: nil,
Annotations: map[string]string{"abc": "def"},
@@ -406,7 +406,8 @@ func TestRecreateStrategyWithVolumesPresent(t *testing.T) {
service := kobject.ServiceConfig{
ContainerName: "name",
Image: "image",
Volumes: []string{"/tmp/volume"},
VolList: []string{"/tmp/volume"},
Volumes: []kobject.Volumes{{SvcName: "app", MountPath: "/tmp/volume", PVCName: "app-claim0"}},
}
komposeObject := kobject.KomposeObject{
ServiceConfigs: map[string]kobject.ServiceConfig{"app": service},