Skip to content

Commit

Permalink
validation: add mount validation
Browse files Browse the repository at this point in the history
Signed-off-by: Zhou Hao <[email protected]>
  • Loading branch information
Zhou Hao committed Jan 9, 2018
1 parent ecdc8ef commit c2f774c
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion validation/mounts.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
package main

import (
rspec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/runtime-tools/validation/util"
)

func main() {
util.Skip("TODO: mounts generation options have not been implemented", "")
g := util.GetDefaultGenerator()
mount := rspec.Mount{
Destination: "/tmp",
Type: "tmpfs",
Source: "tmpfs",
Options: []string{
"nosuid",
"strictatime",
"mode=755",
"size=1k",
},
}
g.AddMount(mount)
err := util.RuntimeInsideValidate(g, nil)
if err != nil {
util.Fatal(err)
}
}

0 comments on commit c2f774c

Please sign in to comment.