Skip to content

Commit 32b6ee1

Browse files
authored
Merge pull request #547 from q384566678/validation-mount
validation: add mount validation
2 parents 7a4cb36 + c2f774c commit 32b6ee1

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

Diff for: validation/mounts.go

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,26 @@
11
package main
22

33
import (
4+
rspec "github.com/opencontainers/runtime-spec/specs-go"
45
"github.com/opencontainers/runtime-tools/validation/util"
56
)
67

78
func main() {
8-
util.Skip("TODO: mounts generation options have not been implemented", "")
9+
g := util.GetDefaultGenerator()
10+
mount := rspec.Mount{
11+
Destination: "/tmp",
12+
Type: "tmpfs",
13+
Source: "tmpfs",
14+
Options: []string{
15+
"nosuid",
16+
"strictatime",
17+
"mode=755",
18+
"size=1k",
19+
},
20+
}
21+
g.AddMount(mount)
22+
err := util.RuntimeInsideValidate(g, nil)
23+
if err != nil {
24+
util.Fatal(err)
25+
}
926
}

0 commit comments

Comments
 (0)