mirror of
https://github.com/containers/podman.git
synced 2025-06-21 09:28:09 +08:00
enable run_restart integration tests
also, correct arg processing mistake in start Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
@ -20,7 +20,6 @@ var (
|
|||||||
Short: "Start one or more containers",
|
Short: "Start one or more containers",
|
||||||
Long: startDescription,
|
Long: startDescription,
|
||||||
RunE: start,
|
RunE: start,
|
||||||
Args: cobra.MinimumNArgs(1),
|
|
||||||
Example: `podman start --latest
|
Example: `podman start --latest
|
||||||
podman start 860a4b231279 5421ab43b45
|
podman start 860a4b231279 5421ab43b45
|
||||||
podman start --interactive --attach imageID`,
|
podman start --interactive --attach imageID`,
|
||||||
@ -72,6 +71,9 @@ func init() {
|
|||||||
|
|
||||||
func start(cmd *cobra.Command, args []string) error {
|
func start(cmd *cobra.Command, args []string) error {
|
||||||
var errs utils.OutputErrors
|
var errs utils.OutputErrors
|
||||||
|
if len(args) == 0 && !startOptions.Latest {
|
||||||
|
return errors.New("start requires at least one argument")
|
||||||
|
}
|
||||||
if len(args) > 1 && startOptions.Attach {
|
if len(args) > 1 && startOptions.Attach {
|
||||||
return errors.Errorf("you cannot start and attach multiple containers at once")
|
return errors.Errorf("you cannot start and attach multiple containers at once")
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,6 @@ var _ = Describe("Podman run restart containers", func() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
Skip(v2fail)
|
|
||||||
tempdir, err = CreateTempDirInTempDir()
|
tempdir, err = CreateTempDirInTempDir()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
Reference in New Issue
Block a user