(t *testing.T)
| 20 | ) |
| 21 | |
| 22 | func TestMountPointDetails(t *testing.T) { |
| 23 | //if _, err := kingpin.CommandLine.Parse([]string{"--path.procfs", "./fixtures/proc"}); err != nil { |
| 24 | // t.Fatal(err) |
| 25 | //} |
| 26 | ProcPath = "./fixtures/proc" |
| 27 | expected := map[string]string{ |
| 28 | "/": "", |
| 29 | "/sys": "", |
| 30 | "/proc": "", |
| 31 | "/dev": "", |
| 32 | "/dev/pts": "", |
| 33 | "/run": "", |
| 34 | "/sys/kernel/security": "", |
| 35 | "/dev/shm": "", |
| 36 | "/run/lock": "", |
| 37 | "/sys/fs/cgroup": "", |
| 38 | "/sys/fs/cgroup/systemd": "", |
| 39 | "/sys/fs/pstore": "", |
| 40 | "/sys/fs/cgroup/cpuset": "", |
| 41 | "/sys/fs/cgroup/cpu,cpuacct": "", |
| 42 | "/sys/fs/cgroup/devices": "", |
| 43 | "/sys/fs/cgroup/freezer": "", |
| 44 | "/sys/fs/cgroup/net_cls,net_prio": "", |
| 45 | "/sys/fs/cgroup/blkio": "", |
| 46 | "/sys/fs/cgroup/perf_event": "", |
| 47 | "/proc/sys/fs/binfmt_misc": "", |
| 48 | "/dev/mqueue": "", |
| 49 | "/sys/kernel/debug": "", |
| 50 | "/dev/hugepages": "", |
| 51 | "/sys/fs/fuse/connections": "", |
| 52 | "/boot": "", |
| 53 | "/run/rpc_pipefs": "", |
| 54 | "/run/user/1000": "", |
| 55 | "/run/user/1000/gvfs": "", |
| 56 | "/var/lib/kubelet/plugins/kubernetes.io/vsphere-volume/mounts/[vsanDatastore] bafb9e5a-8856-7e6c-699c-801844e77a4a/kubernetes-dynamic-pvc-3eba5bba-48a3-11e8-89ab-005056b92113.vmdk": "", |
| 57 | "/var/lib/kubelet/plugins/kubernetes.io/vsphere-volume/mounts/[vsanDatastore] bafb9e5a-8856-7e6c-699c-801844e77a4a/kubernetes-dynamic-pvc-3eba5bba-48a3-11e8-89ab-005056b92113.vmdk": "", |
| 58 | } |
| 59 | |
| 60 | filesystems, err := mountPointDetails() |
| 61 | if err != nil { |
| 62 | t.Log(err) |
| 63 | } |
| 64 | |
| 65 | for _, fs := range filesystems { |
| 66 | if _, ok := expected[fs.mountPoint]; !ok { |
| 67 | t.Errorf("got unexpected %s", fs.mountPoint) |
| 68 | } |
| 69 | } |
| 70 | } |
nothing calls this directly
no test coverage detected