mirror of
https://github.com/docker/compose.git
synced 2025-09-18 23:37:50 +02:00
Unquote volume names in creation events
Volumes are the only resources that are quoted, and only on creation. Signed-off-by: Roberto Villarreal <rrjjvv@yahoo.com>
This commit is contained in:
parent
d09948da41
commit
04b8ac5fe4
@ -1623,7 +1623,7 @@ func (s *composeService) removeDivergedVolume(ctx context.Context, name string,
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *composeService) createVolume(ctx context.Context, volume types.VolumeConfig) error {
|
func (s *composeService) createVolume(ctx context.Context, volume types.VolumeConfig) error {
|
||||||
eventName := fmt.Sprintf("Volume %q", volume.Name)
|
eventName := fmt.Sprintf("Volume %s", volume.Name)
|
||||||
w := progress.ContextWriter(ctx)
|
w := progress.ContextWriter(ctx)
|
||||||
w.Event(progress.CreatingEvent(eventName))
|
w.Event(progress.CreatingEvent(eventName))
|
||||||
hash, err := VolumeHash(volume)
|
hash, err := VolumeHash(volume)
|
||||||
|
@ -175,7 +175,7 @@ func TestUpWithAllResources(t *testing.T) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
res := c.RunDockerComposeCmd(t, "-f", "./fixtures/resources/compose.yaml", "--all-resources", "--project-name", projectName, "up")
|
res := c.RunDockerComposeCmd(t, "-f", "./fixtures/resources/compose.yaml", "--all-resources", "--project-name", projectName, "up")
|
||||||
assert.Assert(t, strings.Contains(res.Combined(), fmt.Sprintf(`Volume "%s_my_vol" Created`, projectName)), res.Combined())
|
assert.Assert(t, strings.Contains(res.Combined(), fmt.Sprintf(`Volume %s_my_vol Created`, projectName)), res.Combined())
|
||||||
assert.Assert(t, strings.Contains(res.Combined(), fmt.Sprintf(`Network %s_my_net Created`, projectName)), res.Combined())
|
assert.Assert(t, strings.Contains(res.Combined(), fmt.Sprintf(`Network %s_my_net Created`, projectName)), res.Combined())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user