@@ -47,33 +47,32 @@ func TestJSONSchema(t *testing.T) {
4747 },
4848 {
4949 config : & rspec.Spec {
50- Version : "1.0.1 -rc1" ,
50+ Version : "1.0.99 -rc1" , // non-existent
5151 },
5252 error : "Could not read schema from HTTP, response status is 404 Not Found" ,
5353 },
5454 {
5555 config : & rspec.Spec {
56- Version : "1.0.0" ,
56+ Version : "1.0.0" , // too old
5757 },
58- error : "" ,
58+ error : "1 error occurred: \n \t * unsupported configuration version (older than 1.0.2) \n \n " ,
5959 },
6060 {
6161 config : & rspec.Spec {
62- Version : "1.0.0" ,
63- Process : & rspec.Process {},
62+ Version : "1.0.2" ,
6463 },
65- error : "1 error occurred: \n \t * args: args is required \n \n " ,
64+ error : "" ,
6665 },
6766 {
6867 config : & rspec.Spec {
69- Version : "1.0.0 " ,
68+ Version : "1.0.2 " ,
7069 Linux : & rspec.Linux {},
7170 },
7271 error : "" ,
7372 },
7473 {
7574 config : & rspec.Spec {
76- Version : "1.0.0 " ,
75+ Version : "1.0.2 " ,
7776 Linux : & rspec.Linux {
7877 RootfsPropagation : "" ,
7978 },
@@ -82,7 +81,7 @@ func TestJSONSchema(t *testing.T) {
8281 },
8382 {
8483 config : & rspec.Spec {
85- Version : "1.0.0 " ,
84+ Version : "1.0.2 " ,
8685 Linux : & rspec.Linux {
8786 RootfsPropagation : "shared" ,
8887 },
@@ -91,7 +90,7 @@ func TestJSONSchema(t *testing.T) {
9190 },
9291 {
9392 config : & rspec.Spec {
94- Version : "1.0.0 " ,
93+ Version : "1.0.2 " ,
9594 Linux : & rspec.Linux {
9695 RootfsPropagation : "rshared" ,
9796 },
@@ -100,13 +99,7 @@ func TestJSONSchema(t *testing.T) {
10099 },
101100 {
102101 config : & rspec.Spec {
103- Version : "1.0.0-rc5" ,
104- },
105- error : "process: process is required" ,
106- },
107- {
108- config : & rspec.Spec {
109- Version : "1.0.0" ,
102+ Version : "1.0.2" ,
110103 Linux : & rspec.Linux {
111104 Namespaces : []rspec.LinuxNamespace {
112105 {
@@ -119,7 +112,7 @@ func TestJSONSchema(t *testing.T) {
119112 },
120113 {
121114 config : & rspec.Spec {
122- Version : "1.0.0 " ,
115+ Version : "1.0.2 " ,
123116 Linux : & rspec.Linux {
124117 Namespaces : []rspec.LinuxNamespace {
125118 {
@@ -132,7 +125,7 @@ func TestJSONSchema(t *testing.T) {
132125 },
133126 {
134127 config : & rspec.Spec {
135- Version : "1.0.0 " ,
128+ Version : "1.0.2 " ,
136129 Linux : & rspec.Linux {
137130 Seccomp : & rspec.LinuxSeccomp {
138131 DefaultAction : "SCMP_ACT_ALLOW" ,
@@ -147,7 +140,7 @@ func TestJSONSchema(t *testing.T) {
147140 },
148141 {
149142 config : & rspec.Spec {
150- Version : "1.0.0 " ,
143+ Version : "1.0.2 " ,
151144 Linux : & rspec.Linux {
152145 Seccomp : & rspec.LinuxSeccomp {
153146 DefaultAction : "SCMP_ACT_ALLOW" ,
@@ -162,7 +155,7 @@ func TestJSONSchema(t *testing.T) {
162155 },
163156 {
164157 config : & rspec.Spec {
165- Version : "1.0.0 " ,
158+ Version : "1.0.2 " ,
166159 Linux : & rspec.Linux {
167160 Seccomp : & rspec.LinuxSeccomp {
168161 DefaultAction : "SCMP_ACT_ALLOW" ,
@@ -179,7 +172,7 @@ func TestJSONSchema(t *testing.T) {
179172 },
180173 {
181174 config : & rspec.Spec {
182- Version : "1.0.0 " ,
175+ Version : "1.0.2 " ,
183176 Linux : & rspec.Linux {
184177 Seccomp : & rspec.LinuxSeccomp {
185178 DefaultAction : "SCMP_ACT_ALLOW" ,
@@ -192,11 +185,11 @@ func TestJSONSchema(t *testing.T) {
192185 },
193186 },
194187 },
195- error : "linux.seccomp.syscalls.0.action: linux.seccomp.syscalls.0.action must be one of the following: \" SCMP_ACT_KILL\" , \" SCMP_ACT_TRAP\" , \" SCMP_ACT_ERRNO\" , \" SCMP_ACT_TRACE\" , \" SCMP_ACT_ALLOW\" " ,
188+ error : "linux.seccomp.syscalls.0.action: linux.seccomp.syscalls.0.action must be one of the following: \" SCMP_ACT_KILL\" , \" SCMP_ACT_TRAP\" , \" SCMP_ACT_ERRNO\" , \" SCMP_ACT_TRACE\" , \" SCMP_ACT_ALLOW\" , \" SCMP_ACT_LOG \" " ,
196189 },
197190 {
198191 config : & rspec.Spec {
199- Version : "1.0.0 " ,
192+ Version : "1.0.2 " ,
200193 Linux : & rspec.Linux {
201194 Seccomp : & rspec.LinuxSeccomp {
202195 DefaultAction : "SCMP_ACT_ALLOW" ,
@@ -220,7 +213,7 @@ func TestJSONSchema(t *testing.T) {
220213 },
221214 {
222215 config : & rspec.Spec {
223- Version : "1.0.0 " ,
216+ Version : "1.0.2 " ,
224217 Linux : & rspec.Linux {
225218 Seccomp : & rspec.LinuxSeccomp {
226219 DefaultAction : "SCMP_ACT_ALLOW" ,
@@ -322,7 +315,7 @@ func TestCheckSemVer(t *testing.T) {
322315 expected specerror.Code
323316 }{
324317 {rspec .Version , specerror .NonError },
325- //FIXME: validate currently only handles rpsec.Version
318+ // FIXME: validate currently only handles rpsec.Version
326319 {"0.0.1" , specerror .NonRFCError },
327320 {"invalid" , specerror .SpecVersionInSemVer },
328321 }
0 commit comments