mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-04 18:51:17 +00:00
20 lines
335 B
Go
20 lines
335 B
Go
package linux
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestMounts(t *testing.T) {
|
|
mounts, err := ReadMounts("proc/mounts")
|
|
if err != nil {
|
|
t.Fatal("mounts read fail")
|
|
}
|
|
t.Logf("%+v", mounts)
|
|
if mounts.Mounts[0].Device != "rootfs" {
|
|
t.Fatal("unexpected value")
|
|
}
|
|
if mounts.Mounts[1].FSType != "proc" {
|
|
t.Fatal("unexpected value")
|
|
}
|
|
}
|