mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
ec87479b7e
Please refer to `docs/rootless.md`. TLDR: * Make sure `/etc/subuid` and `/etc/subgid` contain the entry for you * `dockerd-rootless.sh --experimental` * `docker -H unix://$XDG_RUNTIME_DIR/docker.sock run ...` Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
24 lines
617 B
Go
24 lines
617 B
Go
// +build linux freebsd
|
|
|
|
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/docker/docker/daemon/config"
|
|
"github.com/spf13/pflag"
|
|
"gotest.tools/assert"
|
|
is "gotest.tools/assert/cmp"
|
|
)
|
|
|
|
func TestDaemonParseShmSize(t *testing.T) {
|
|
flags := pflag.NewFlagSet("test", pflag.ContinueOnError)
|
|
|
|
conf := &config.Config{}
|
|
err := installConfigFlags(conf, flags)
|
|
assert.NilError(t, err)
|
|
// By default `--default-shm-size=64M`
|
|
assert.Check(t, is.Equal(int64(64*1024*1024), conf.ShmSize.Value()))
|
|
assert.Check(t, flags.Set("default-shm-size", "128M"))
|
|
assert.Check(t, is.Equal(int64(128*1024*1024), conf.ShmSize.Value()))
|
|
}
|