mirror of https://github.com/docker/compose.git
Set `pullChanged` when setting `--pull` on `compose up`
Add e2e tests Signed-off-by: Laura Brehm <laurabrehm@hey.com>
This commit is contained in:
parent
ffce33ec11
commit
a224780795
|
@ -93,6 +93,7 @@ func upCommand(p *ProjectOptions, streams api.Streams, backend api.Service) *cob
|
||||||
Use: "up [OPTIONS] [SERVICE...]",
|
Use: "up [OPTIONS] [SERVICE...]",
|
||||||
Short: "Create and start containers",
|
Short: "Create and start containers",
|
||||||
PreRunE: AdaptCmd(func(ctx context.Context, cmd *cobra.Command, args []string) error {
|
PreRunE: AdaptCmd(func(ctx context.Context, cmd *cobra.Command, args []string) error {
|
||||||
|
create.pullChanged = cmd.Flags().Changed("pull")
|
||||||
create.timeChanged = cmd.Flags().Changed("timeout")
|
create.timeChanged = cmd.Flags().Changed("timeout")
|
||||||
return validateFlags(&up, &create)
|
return validateFlags(&up, &create)
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
Feature: Up
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given a compose file
|
||||||
|
"""
|
||||||
|
services:
|
||||||
|
simple:
|
||||||
|
image: alpine
|
||||||
|
command: top
|
||||||
|
"""
|
||||||
|
|
||||||
|
Scenario: --pull always
|
||||||
|
When I run "compose up --pull=always -d"
|
||||||
|
Then the output contains "simple Pulled"
|
||||||
|
|
Loading…
Reference in New Issue