Skip to content

Commit

Permalink
Merge pull request opencontainers#547 from q384566678/validation-mount
Browse files Browse the repository at this point in the history
validation: add mount validation
  • Loading branch information
liangchenye authored Jan 10, 2018
2 parents 7a4cb36 + c2f774c commit 32b6ee1
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 32b6ee1

Please sign in to comment.