Skip to content

Commit a224780

Browse files
laurazardndeloof
authored andcommitted
Set pullChanged when setting --pull on compose up
Add e2e tests Signed-off-by: Laura Brehm <[email protected]>
1 parent ffce33e commit a224780

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

cmd/compose/up.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ func upCommand(p *ProjectOptions, streams api.Streams, backend api.Service) *cob
9393
Use: "up [OPTIONS] [SERVICE...]",
9494
Short: "Create and start containers",
9595
PreRunE: AdaptCmd(func(ctx context.Context, cmd *cobra.Command, args []string) error {
96+
create.pullChanged = cmd.Flags().Changed("pull")
9697
create.timeChanged = cmd.Flags().Changed("timeout")
9798
return validateFlags(&up, &create)
9899
}),

e2e/cucumber-features/up.feature

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Feature: Up
2+
3+
Background:
4+
Given a compose file
5+
"""
6+
services:
7+
simple:
8+
image: alpine
9+
command: top
10+
"""
11+
12+
Scenario: --pull always
13+
When I run "compose up --pull=always -d"
14+
Then the output contains "simple Pulled"
15+

0 commit comments

Comments
 (0)