File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -965,10 +965,23 @@ services:
965965 image: db
966966 build:
967967 context: ./db
968+ shm_size: 2gb
968969`
969970 configDetails := buildConfigDetails (dict , nil )
970- _ , err := Load (configDetails )
971+ actual , err := Load (configDetails )
971972 assert .NilError (t , err )
973+
974+ wd , _ := os .Getwd ()
975+ assert .DeepEqual (t , actual .Services ["web" ].Build , & types.BuildConfig {
976+ Context : wd ,
977+ Dockerfile : "Dockerfile" ,
978+ })
979+
980+ assert .DeepEqual (t , actual .Services ["db" ].Build , & types.BuildConfig {
981+ Context : wd + "/db" ,
982+ Dockerfile : "Dockerfile" ,
983+ ShmSize : types .UnitBytes (2 * 1024 * 1024 * 1024 ),
984+ })
972985}
973986
974987func TestDeprecatedProperties (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -281,6 +281,7 @@ type BuildConfig struct {
281281 Network string `yaml:"network,omitempty" json:"network,omitempty"`
282282 Target string `yaml:"target,omitempty" json:"target,omitempty"`
283283 Secrets []ServiceSecretConfig `yaml:"secrets,omitempty" json:"secrets,omitempty"`
284+ ShmSize UnitBytes `yaml:"shm_size,omitempty" json:"shm_size,omitempty"`
284285 Tags StringList `yaml:"tags,omitempty" json:"tags,omitempty"`
285286 Ulimits map [string ]* UlimitsConfig `yaml:"ulimits,omitempty" json:"ulimits,omitempty"`
286287 Platforms StringList `yaml:"platforms,omitempty" json:"platforms,omitempty"`
You can’t perform that action at this time.
0 commit comments