(t *testing.T)
| 9 | ) |
| 10 | |
| 11 | func TestCheckMountDestInProc(t *testing.T) { |
| 12 | m := mountEntry{ |
| 13 | Mount: &configs.Mount{ |
| 14 | Destination: "/proc/sys", |
| 15 | Source: "/proc/sys", |
| 16 | Device: "bind", |
| 17 | Flags: unix.MS_BIND, |
| 18 | }, |
| 19 | } |
| 20 | dest := "/rootfs/proc/sys" |
| 21 | err := checkProcMount("/rootfs", dest, m) |
| 22 | if err == nil { |
| 23 | t.Fatal("destination inside proc should return an error") |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | func TestCheckProcMountOnProc(t *testing.T) { |
| 28 | m := mountEntry{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…