Revert docker volume column name to VOLUME_NAME

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester 2016-10-17 20:03:31 +02:00
parent 6566662d1b
commit 6c3c3a87ba
2 changed files with 6 additions and 5 deletions

View File

@ -12,6 +12,7 @@ const (
defaultVolumeQuietFormat = "{{.Name}}"
defaultVolumeTableFormat = "table {{.Driver}}\t{{.Name}}"
volumeNameHeader = "VOLUME NAME"
mountpointHeader = "MOUNTPOINT"
linksHeader = "LINKS"
// Status header ?
@ -53,7 +54,7 @@ type volumeContext struct {
}
func (c *volumeContext) Name() string {
c.AddHeader(nameHeader)
c.AddHeader(volumeNameHeader)
return c.v.Name
}

View File

@ -22,7 +22,7 @@ func TestVolumeContext(t *testing.T) {
}{
{volumeContext{
v: types.Volume{Name: volumeName},
}, volumeName, nameHeader, ctx.Name},
}, volumeName, volumeNameHeader, ctx.Name},
{volumeContext{
v: types.Volume{Driver: "driver_name"},
}, "driver_name", driverHeader, ctx.Driver},
@ -76,7 +76,7 @@ func TestVolumeContextWrite(t *testing.T) {
// Table format
{
Context{Format: NewVolumeFormat("table", false)},
`DRIVER NAME
`DRIVER VOLUME NAME
foo foobar_baz
bar foobar_bar
`,
@ -89,14 +89,14 @@ foobar_bar
},
{
Context{Format: NewVolumeFormat("table {{.Name}}", false)},
`NAME
`VOLUME NAME
foobar_baz
foobar_bar
`,
},
{
Context{Format: NewVolumeFormat("table {{.Name}}", true)},
`NAME
`VOLUME NAME
foobar_baz
foobar_bar
`,