1
0
镜像自地址 https://github.com/tuna/tunasync.git 已同步 2025-12-06 14:36:47 +00:00

change type of memlimit from string to int64

这个提交包含在:
Miao Wang
2021-07-12 19:09:25 +08:00
父节点 80f0161eb0
当前提交 3ce5c2ede3
共有 6 个文件被更改,包括 45 次插入7 次删除

查看文件

@@ -8,6 +8,7 @@ import (
"strings"
"testing"
"time"
units "github.com/docker/go-units"
. "github.com/smartystreets/goconvey/convey"
)
@@ -72,7 +73,7 @@ sleep 30
provider, err := newCmdProvider(c)
So(err, ShouldBeNil)
cg := newCgroupHook(provider, "/sys/fs/cgroup", "tunasync", "cpu", "")
cg := newCgroupHook(provider, "/sys/fs/cgroup", "tunasync", "cpu", 0)
provider.AddHook(cg)
err = cg.preExec()
@@ -132,7 +133,7 @@ sleep 30
provider, err := newRsyncProvider(c)
So(err, ShouldBeNil)
cg := newCgroupHook(provider, "/sys/fs/cgroup", "tunasync", "cpu", "512M")
cg := newCgroupHook(provider, "/sys/fs/cgroup", "tunasync", "cpu", 512 * units.MiB)
provider.AddHook(cg)
err = cg.preExec()