blob: 7a4bf67ae77148b3c6f78dae1b230315ff713b1f [file] [log] [blame] [edit]
package container
import (
"testing"
"github.com/docker/cli/e2e/internal/fixtures"
"gotest.tools/v3/icmd"
)
func TestCreateWithEmptySourceVolume(t *testing.T) {
icmd.RunCmd(icmd.Command("docker", "create", "-v", ":/volume", fixtures.AlpineImage)).
Assert(t, icmd.Expected{
ExitCode: 125,
Err: "empty section between colons",
})
}
func TestCreateWithEmptyVolumeSpec(t *testing.T) {
icmd.RunCmd(icmd.Command("docker", "create", "-v", "", fixtures.AlpineImage)).
Assert(t, icmd.Expected{
ExitCode: 125,
Err: "invalid empty volume spec",
})
}