integration-cli: migrated test TestContainerAPIRename to docker/cli
| ... | ... |
@@ -810,22 +810,6 @@ func (s *DockerAPISuite) TestCreateWithTooLowMemoryLimit(c *testing.T) {
|
| 810 | 810 |
assert.Assert(c, is.Contains(string(b), "Minimum memory limit allowed is 6MB")) |
| 811 | 811 |
} |
| 812 | 812 |
|
| 813 |
-func (s *DockerAPISuite) TestContainerAPIRename(c *testing.T) {
|
|
| 814 |
- out := cli.DockerCmd(c, "run", "--name", "TestContainerAPIRename", "-d", "busybox", "sh").Stdout() |
|
| 815 |
- containerID := strings.TrimSpace(out) |
|
| 816 |
- const newName = "TestContainerAPIRenameNew" |
|
| 817 |
- |
|
| 818 |
- apiClient, err := client.NewClientWithOpts(client.FromEnv) |
|
| 819 |
- assert.NilError(c, err) |
|
| 820 |
- defer apiClient.Close() |
|
| 821 |
- |
|
| 822 |
- err = apiClient.ContainerRename(testutil.GetContext(c), containerID, newName) |
|
| 823 |
- assert.NilError(c, err) |
|
| 824 |
- |
|
| 825 |
- name := inspectField(c, containerID, "Name") |
|
| 826 |
- assert.Equal(c, name, "/"+newName, "Failed to rename container") |
|
| 827 |
-} |
|
| 828 |
- |
|
| 829 | 813 |
func (s *DockerAPISuite) TestContainerAPIKill(c *testing.T) {
|
| 830 | 814 |
const name = "test-api-kill" |
| 831 | 815 |
runSleepingContainer(c, "-i", "--name", name) |