Skip to content

Commit bd16d0d

Browse files
authored
Merge pull request #476 from wking/json-schema-rootfs-propagation-test
validate/validate_test: Add linux.rootfsPropagation checks
2 parents c9abefb + 2cbb341 commit bd16d0d

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

Diff for: validate/validate_test.go

+34
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,40 @@ func TestJSONSchema(t *testing.T) {
6161
},
6262
error: "process.args: Invalid type. Expected: array, given: null",
6363
},
64+
{
65+
config: &rspec.Spec{
66+
Version: "1.0.0",
67+
Linux: &rspec.Linux{},
68+
},
69+
error: "",
70+
},
71+
{
72+
config: &rspec.Spec{
73+
Version: "1.0.0",
74+
Linux: &rspec.Linux{
75+
RootfsPropagation: "",
76+
},
77+
},
78+
error: "",
79+
},
80+
{
81+
config: &rspec.Spec{
82+
Version: "1.0.0",
83+
Linux: &rspec.Linux{
84+
RootfsPropagation: "shared",
85+
},
86+
},
87+
error: "",
88+
},
89+
{
90+
config: &rspec.Spec{
91+
Version: "1.0.0",
92+
Linux: &rspec.Linux{
93+
RootfsPropagation: "rshared",
94+
},
95+
},
96+
error: "linux.rootfsPropagation: linux.rootfsPropagation must be one of the following: \"private\", \"shared\", \"slave\", \"unbindable\"",
97+
},
6498
{
6599
config: &rspec.Spec{
66100
Version: "1.0.0-rc5",

0 commit comments

Comments
 (0)