Skip to content

Commit 04b8ac5

Browse files
rrjjvvndeloof
authored andcommitted
Unquote volume names in creation events
Volumes are the only resources that are quoted, and only on creation. Signed-off-by: Roberto Villarreal <[email protected]>
1 parent d09948d commit 04b8ac5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/compose/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,7 @@ func (s *composeService) removeDivergedVolume(ctx context.Context, name string,
16231623
}
16241624

16251625
func (s *composeService) createVolume(ctx context.Context, volume types.VolumeConfig) error {
1626-
eventName := fmt.Sprintf("Volume %q", volume.Name)
1626+
eventName := fmt.Sprintf("Volume %s", volume.Name)
16271627
w := progress.ContextWriter(ctx)
16281628
w.Event(progress.CreatingEvent(eventName))
16291629
hash, err := VolumeHash(volume)

pkg/e2e/up_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func TestUpWithAllResources(t *testing.T) {
175175
})
176176

177177
res := c.RunDockerComposeCmd(t, "-f", "./fixtures/resources/compose.yaml", "--all-resources", "--project-name", projectName, "up")
178-
assert.Assert(t, strings.Contains(res.Combined(), fmt.Sprintf(`Volume "%s_my_vol" Created`, projectName)), res.Combined())
178+
assert.Assert(t, strings.Contains(res.Combined(), fmt.Sprintf(`Volume %s_my_vol Created`, projectName)), res.Combined())
179179
assert.Assert(t, strings.Contains(res.Combined(), fmt.Sprintf(`Network %s_my_net Created`, projectName)), res.Combined())
180180
}
181181

0 commit comments

Comments
 (0)