Browse code

integration-cli: TestRunInvalidCpuset.. create instead of run

These tests don't have to run a container, as validation happens
on create.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2025/01/01 01:31:31
Showing 1 changed files
... ...
@@ -704,7 +704,7 @@ func (s *DockerCLIRunSuite) TestRunInvalidCpusetCpusFlagValue(c *testing.T) {
704 704
 			break
705 705
 		}
706 706
 	}
707
-	out, _, err := dockerCmdWithError("run", "--cpuset-cpus", strconv.Itoa(invalid), "busybox", "true")
707
+	out, _, err := dockerCmdWithError("create", "--cpuset-cpus", strconv.Itoa(invalid), "busybox", "true")
708 708
 	assert.ErrorContains(c, err, "")
709 709
 	expected := fmt.Sprintf("Error response from daemon: Requested CPUs are not available - requested %s, available: %s", strconv.Itoa(invalid), sysInfo.Cpus)
710 710
 	assert.Assert(c, is.Contains(out, expected))
... ...
@@ -723,7 +723,7 @@ func (s *DockerCLIRunSuite) TestRunInvalidCpusetMemsFlagValue(c *testing.T) {
723 723
 			break
724 724
 		}
725 725
 	}
726
-	out, _, err := dockerCmdWithError("run", "--cpuset-mems", strconv.Itoa(invalid), "busybox", "true")
726
+	out, _, err := dockerCmdWithError("create", "--cpuset-mems", strconv.Itoa(invalid), "busybox", "true")
727 727
 	assert.ErrorContains(c, err, "")
728 728
 	expected := fmt.Sprintf("Error response from daemon: Requested memory nodes are not available - requested %s, available: %s", strconv.Itoa(invalid), sysInfo.Mems)
729 729
 	assert.Assert(c, is.Contains(out, expected))