@@ -31,7 +31,7 @@ func fullExampleConfig(workingDir, homeDir string) *types.Config {
31
31
Services : services (workingDir , homeDir ),
32
32
Networks : networks (),
33
33
Volumes : volumes (),
34
- Configs : configs (workingDir ),
34
+ Configs : configs (workingDir , homeDir ),
35
35
Secrets : secrets (workingDir ),
36
36
Extensions : map [string ]interface {}{
37
37
"x-foo" : "bar" ,
@@ -520,7 +520,7 @@ func volumes() map[string]types.VolumeConfig {
520
520
}
521
521
}
522
522
523
- func configs (workingDir string ) map [string ]types.ConfigObjConfig {
523
+ func configs (workingDir string , homeDir string ) map [string ]types.ConfigObjConfig {
524
524
return map [string ]types.ConfigObjConfig {
525
525
"config1" : {
526
526
File : filepath .Join (workingDir , "config_data" ),
@@ -538,7 +538,7 @@ func configs(workingDir string) map[string]types.ConfigObjConfig {
538
538
},
539
539
"config4" : {
540
540
Name : "foo" ,
541
- File : workingDir ,
541
+ File : filepath . Join ( homeDir , "config_data" ) ,
542
542
Extensions : map [string ]interface {}{
543
543
"x-bar" : "baz" ,
544
544
"x-foo" : "bar" ,
@@ -564,8 +564,8 @@ func secrets(workingDir string) map[string]types.SecretConfig {
564
564
External : types.External {External : true },
565
565
},
566
566
"secret4" : {
567
- Name : "bar" ,
568
- File : workingDir ,
567
+ Name : "bar" ,
568
+ Environment : "BAR" ,
569
569
Extensions : map [string ]interface {}{
570
570
"x-bar" : "baz" ,
571
571
"x-foo" : "bar" ,
@@ -973,7 +973,7 @@ secrets:
973
973
external: true
974
974
secret4:
975
975
name: bar
976
- file: %s
976
+ environment: BAR
977
977
x-bar: baz
978
978
x-foo: bar
979
979
configs:
@@ -1003,9 +1003,8 @@ x-nested:
1003
1003
filepath .Join (homeDir , "configs" ),
1004
1004
filepath .Join (workingDir , "opt" ),
1005
1005
filepath .Join (workingDir , "secret_data" ),
1006
- filepath .Join (workingDir ),
1007
1006
filepath .Join (workingDir , "config_data" ),
1008
- filepath .Join (workingDir ))
1007
+ filepath .Join (homeDir , "config_data" ))
1009
1008
}
1010
1009
1011
1010
func fullExampleJSON (workingDir , homeDir string ) string {
@@ -1096,7 +1095,7 @@ func fullExampleJSON(workingDir, homeDir string) string {
1096
1095
},
1097
1096
"secret4": {
1098
1097
"name": "bar",
1099
- "file ": "%s ",
1098
+ "environment ": "BAR ",
1100
1099
"external": false
1101
1100
}
1102
1101
},
@@ -1613,10 +1612,9 @@ func fullExampleJSON(workingDir, homeDir string) string {
1613
1612
}
1614
1613
}` ,
1615
1614
toPath (workingDir , "config_data" ),
1616
- toPath (workingDir ),
1615
+ toPath (homeDir , "config_data" ),
1617
1616
toPath (workingDir , "secret_data" ),
1618
1617
toPath (workingDir ),
1619
- toPath (workingDir ),
1620
1618
toPath (workingDir , "static" ),
1621
1619
toPath (homeDir , "configs" ),
1622
1620
toPath (workingDir , "opt" ))
0 commit comments