@@ -31,7 +31,7 @@ func fullExampleConfig(workingDir, homeDir string) *types.Config {
3131 Services : services (workingDir , homeDir ),
3232 Networks : networks (),
3333 Volumes : volumes (),
34- Configs : configs (workingDir ),
34+ Configs : configs (workingDir , homeDir ),
3535 Secrets : secrets (workingDir ),
3636 Extensions : map [string ]interface {}{
3737 "x-foo" : "bar" ,
@@ -520,7 +520,7 @@ func volumes() map[string]types.VolumeConfig {
520520 }
521521}
522522
523- func configs (workingDir string ) map [string ]types.ConfigObjConfig {
523+ func configs (workingDir string , homeDir string ) map [string ]types.ConfigObjConfig {
524524 return map [string ]types.ConfigObjConfig {
525525 "config1" : {
526526 File : filepath .Join (workingDir , "config_data" ),
@@ -538,7 +538,7 @@ func configs(workingDir string) map[string]types.ConfigObjConfig {
538538 },
539539 "config4" : {
540540 Name : "foo" ,
541- File : workingDir ,
541+ File : filepath . Join ( homeDir , "config_data" ) ,
542542 Extensions : map [string ]interface {}{
543543 "x-bar" : "baz" ,
544544 "x-foo" : "bar" ,
@@ -564,8 +564,8 @@ func secrets(workingDir string) map[string]types.SecretConfig {
564564 External : types.External {External : true },
565565 },
566566 "secret4" : {
567- Name : "bar" ,
568- File : workingDir ,
567+ Name : "bar" ,
568+ Environment : "BAR" ,
569569 Extensions : map [string ]interface {}{
570570 "x-bar" : "baz" ,
571571 "x-foo" : "bar" ,
@@ -973,7 +973,7 @@ secrets:
973973 external: true
974974 secret4:
975975 name: bar
976- file: %s
976+ environment: BAR
977977 x-bar: baz
978978 x-foo: bar
979979configs:
@@ -1003,9 +1003,8 @@ x-nested:
10031003 filepath .Join (homeDir , "configs" ),
10041004 filepath .Join (workingDir , "opt" ),
10051005 filepath .Join (workingDir , "secret_data" ),
1006- filepath .Join (workingDir ),
10071006 filepath .Join (workingDir , "config_data" ),
1008- filepath .Join (workingDir ))
1007+ filepath .Join (homeDir , "config_data" ))
10091008}
10101009
10111010func fullExampleJSON (workingDir , homeDir string ) string {
@@ -1096,7 +1095,7 @@ func fullExampleJSON(workingDir, homeDir string) string {
10961095 },
10971096 "secret4": {
10981097 "name": "bar",
1099- "file ": "%s ",
1098+ "environment ": "BAR ",
11001099 "external": false
11011100 }
11021101 },
@@ -1613,10 +1612,9 @@ func fullExampleJSON(workingDir, homeDir string) string {
16131612 }
16141613}` ,
16151614 toPath (workingDir , "config_data" ),
1616- toPath (workingDir ),
1615+ toPath (homeDir , "config_data" ),
16171616 toPath (workingDir , "secret_data" ),
16181617 toPath (workingDir ),
1619- toPath (workingDir ),
16201618 toPath (workingDir , "static" ),
16211619 toPath (homeDir , "configs" ),
16221620 toPath (workingDir , "opt" ))
0 commit comments