Signed-off-by: mYmNeo <thomassong@tencent.com>
| ... | ... |
@@ -68,15 +68,15 @@ func (s *DockerSuite) TestCreateGrowRootfs(c *check.C) {
|
| 68 | 68 |
cleanedContainerID := strings.TrimSpace(out) |
| 69 | 69 |
|
| 70 | 70 |
inspectOut := inspectField(c, cleanedContainerID, "HostConfig.StorageOpt") |
| 71 |
- c.Assert(inspectOut, checker.Equals, "[size=120G]") |
|
| 71 |
+ c.Assert(inspectOut, checker.Equals, "map[size:120G]") |
|
| 72 | 72 |
} |
| 73 | 73 |
|
| 74 | 74 |
// Make sure we cannot shrink the container's rootfs at creation time. |
| 75 | 75 |
func (s *DockerSuite) TestCreateShrinkRootfs(c *check.C) {
|
| 76 | 76 |
testRequires(c, Devicemapper) |
| 77 | 77 |
|
| 78 |
- // Ensure this fails |
|
| 79 |
- out, _, err := dockerCmdWithError("create", "--storage-opt", "size=80G", "busybox")
|
|
| 78 |
+ // Ensure this fails because of the defaultBaseFsSize is 10G |
|
| 79 |
+ out, _, err := dockerCmdWithError("create", "--storage-opt", "size=5G", "busybox")
|
|
| 80 | 80 |
c.Assert(err, check.NotNil, check.Commentf(out)) |
| 81 | 81 |
c.Assert(out, checker.Contains, "Container size cannot be smaller than") |
| 82 | 82 |
} |