]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
75bd9771 | 2 | # "$Id: 4.3-job-ops.test 7550 2008-05-12 16:40:40Z mike $" |
ef416fc2 | 3 | # |
4 | # Verify that the IPP job operations work. | |
5 | # | |
3dfe78b3 MS |
6 | { |
7 | # The name of the test... | |
8 | NAME "Print PostScript Job with bad job-sheets value to Test1" | |
9 | ||
10 | # The operation to use | |
11 | OPERATION print-job | |
12 | RESOURCE /printers/Test1 | |
13 | ||
14 | # The attributes to send | |
15 | GROUP operation | |
16 | ATTR charset attributes-charset utf-8 | |
17 | ATTR language attributes-natural-language en | |
18 | ATTR uri printer-uri $method://$hostname:$port/printers/Test1 | |
19 | ATTR name requesting-user-name $user | |
20 | ATTR name job-sheets "none\,none" | |
21 | ||
22 | FILE testfile.ps | |
23 | ||
24 | # What statuses are OK? | |
25 | STATUS client-error-bad-request | |
26 | } | |
ef416fc2 | 27 | { |
28 | # The name of the test... | |
29 | NAME "Print PostScript Job to Test1" | |
30 | ||
31 | # The operation to use | |
32 | OPERATION print-job | |
33 | RESOURCE /printers/Test1 | |
34 | ||
35 | # The attributes to send | |
36 | GROUP operation | |
37 | ATTR charset attributes-charset utf-8 | |
38 | ATTR language attributes-natural-language en | |
39 | ATTR uri printer-uri $method://$hostname:$port/printers/Test1 | |
40 | ATTR name requesting-user-name $user | |
41 | ||
42 | FILE testfile.ps | |
43 | ||
44 | # What statuses are OK? | |
45 | STATUS successful-ok | |
46 | ||
47 | # What attributes do we expect? | |
48 | EXPECT attributes-charset | |
49 | EXPECT attributes-natural-language | |
50 | EXPECT job-id | |
51 | } | |
52 | { | |
53 | # The name of the test... | |
54 | NAME "Get Job Attributes" | |
55 | ||
56 | # The operation to use | |
57 | OPERATION get-job-attributes | |
58 | RESOURCE /jobs | |
59 | ||
60 | # The attributes to send | |
61 | GROUP operation | |
62 | ATTR charset attributes-charset utf-8 | |
63 | ATTR language attributes-natural-language en | |
64 | ATTR uri printer-uri $method://$hostname:$port/printers/Test1 | |
65 | ATTR integer job-id $job-id | |
66 | ||
67 | # What statuses are OK? | |
68 | STATUS successful-ok | |
69 | ||
70 | # What attributes do we expect? | |
71 | EXPECT attributes-charset | |
72 | EXPECT attributes-natural-language | |
73 | EXPECT job-id | |
74 | EXPECT job-uri | |
75 | EXPECT job-state | |
76 | } | |
77 | { | |
78 | # The name of the test... | |
a74454a7 | 79 | NAME "Print JPEG Job to Test2" |
ef416fc2 | 80 | |
81 | # The operation to use | |
82 | OPERATION print-job | |
83 | RESOURCE /printers/Test2 | |
84 | ||
85 | # The attributes to send | |
86 | GROUP operation | |
87 | ATTR charset attributes-charset utf-8 | |
88 | ATTR language attributes-natural-language en | |
89 | ATTR uri printer-uri $method://$hostname:$port/printers/Test2 | |
90 | ATTR name requesting-user-name $user | |
91 | ||
92 | GROUP subscription | |
3dfe78b3 | 93 | ATTR uri notify-recipient-uri testnotify:/// |
ef416fc2 | 94 | |
a74454a7 | 95 | FILE testfile.jpg |
ef416fc2 | 96 | |
97 | # What statuses are OK? | |
98 | STATUS successful-ok | |
99 | ||
100 | # What attributes do we expect? | |
101 | EXPECT attributes-charset | |
102 | EXPECT attributes-natural-language | |
103 | EXPECT job-id | |
104 | EXPECT notify-subscription-id | |
105 | } | |
106 | { | |
107 | # The name of the test... | |
108 | NAME "Get Job Attributes" | |
109 | ||
110 | # The operation to use | |
111 | OPERATION get-job-attributes | |
112 | RESOURCE /jobs | |
113 | ||
114 | # The attributes to send | |
115 | GROUP operation | |
116 | ATTR charset attributes-charset utf-8 | |
117 | ATTR language attributes-natural-language en | |
118 | ATTR uri printer-uri $method://$hostname:$port/printers/Test2 | |
119 | ATTR integer job-id $job-id | |
120 | ||
121 | # What statuses are OK? | |
122 | STATUS successful-ok | |
123 | ||
124 | # What attributes do we expect? | |
125 | EXPECT attributes-charset | |
126 | EXPECT attributes-natural-language | |
127 | EXPECT job-id | |
128 | EXPECT job-uri | |
129 | EXPECT job-state | |
130 | } | |
131 | { | |
132 | # The name of the test... | |
133 | NAME "Print Text Job to Test1" | |
134 | ||
135 | # The operation to use | |
136 | OPERATION print-job | |
137 | RESOURCE /printers/Test1 | |
138 | ||
139 | # The attributes to send | |
140 | GROUP operation | |
141 | ATTR charset attributes-charset utf-8 | |
142 | ATTR language attributes-natural-language en | |
143 | ATTR uri printer-uri $method://$hostname:$port/printers/Test1 | |
144 | ATTR name requesting-user-name $user | |
145 | ||
146 | FILE testfile.txt | |
147 | ||
148 | # What statuses are OK? | |
149 | STATUS successful-ok | |
150 | ||
151 | # What attributes do we expect? | |
152 | EXPECT attributes-charset | |
153 | EXPECT attributes-natural-language | |
154 | EXPECT job-id | |
155 | } | |
156 | { | |
157 | # The name of the test... | |
158 | NAME "Print PDF Job to Test1" | |
159 | ||
160 | # The operation to use | |
161 | OPERATION print-job | |
162 | RESOURCE /printers/Test1 | |
163 | ||
164 | # The attributes to send | |
165 | GROUP operation | |
166 | ATTR charset attributes-charset utf-8 | |
167 | ATTR language attributes-natural-language en | |
168 | ATTR uri printer-uri $method://$hostname:$port/printers/Test1 | |
169 | ATTR name requesting-user-name $user | |
170 | ||
969307f0 MS |
171 | GROUP job |
172 | ATTR keyword job-hold-until weekend | |
173 | ||
ef416fc2 | 174 | FILE testfile.pdf |
175 | ||
176 | # What statuses are OK? | |
177 | STATUS successful-ok | |
178 | ||
179 | # What attributes do we expect? | |
180 | EXPECT attributes-charset | |
181 | EXPECT attributes-natural-language | |
182 | EXPECT job-id | |
183 | } | |
184 | { | |
185 | # The name of the test... | |
839a51c8 | 186 | NAME "Hold Job on Test1" |
ef416fc2 | 187 | |
188 | # The operation to use | |
839a51c8 | 189 | OPERATION hold-job |
ef416fc2 | 190 | RESOURCE /printers/Test1 |
191 | ||
192 | # The attributes to send | |
193 | GROUP operation | |
194 | ATTR charset attributes-charset utf-8 | |
195 | ATTR language attributes-natural-language en | |
196 | ATTR uri printer-uri $method://$hostname:$port/printers/Test1 | |
839a51c8 | 197 | ATTR integer job-id $job-id |
ef416fc2 | 198 | ATTR name requesting-user-name $user |
199 | ||
ef416fc2 | 200 | # What statuses are OK? |
201 | STATUS successful-ok | |
202 | ||
203 | # What attributes do we expect? | |
204 | EXPECT attributes-charset | |
205 | EXPECT attributes-natural-language | |
ef416fc2 | 206 | } |
207 | { | |
208 | # The name of the test... | |
839a51c8 | 209 | NAME "Release Job on Test1" |
ef416fc2 | 210 | |
211 | # The operation to use | |
839a51c8 | 212 | OPERATION release-job |
ef416fc2 | 213 | RESOURCE /printers/Test1 |
214 | ||
215 | # The attributes to send | |
216 | GROUP operation | |
217 | ATTR charset attributes-charset utf-8 | |
218 | ATTR language attributes-natural-language en | |
219 | ATTR uri printer-uri $method://$hostname:$port/printers/Test1 | |
220 | ATTR integer job-id $job-id | |
221 | ATTR name requesting-user-name $user | |
222 | ||
223 | # What statuses are OK? | |
224 | STATUS successful-ok | |
225 | ||
226 | # What attributes do we expect? | |
227 | EXPECT attributes-charset | |
228 | EXPECT attributes-natural-language | |
229 | } | |
230 | { | |
231 | # The name of the test... | |
839a51c8 | 232 | NAME "Print Held Image Job to Test1" |
ef416fc2 | 233 | |
234 | # The operation to use | |
839a51c8 | 235 | OPERATION print-job |
ef416fc2 | 236 | RESOURCE /printers/Test1 |
237 | ||
238 | # The attributes to send | |
239 | GROUP operation | |
240 | ATTR charset attributes-charset utf-8 | |
241 | ATTR language attributes-natural-language en | |
242 | ATTR uri printer-uri $method://$hostname:$port/printers/Test1 | |
ef416fc2 | 243 | ATTR name requesting-user-name $user |
839a51c8 MS |
244 | GROUP job |
245 | ATTR keyword job-hold-until indefinite | |
246 | ||
247 | FILE testfile.jpg | |
ef416fc2 | 248 | |
249 | # What statuses are OK? | |
250 | STATUS successful-ok | |
251 | ||
252 | # What attributes do we expect? | |
253 | EXPECT attributes-charset | |
254 | EXPECT attributes-natural-language | |
839a51c8 | 255 | EXPECT job-id |
ef416fc2 | 256 | } |
257 | { | |
258 | # The name of the test... | |
839a51c8 | 259 | NAME "Cancel Job" |
ef416fc2 | 260 | |
261 | # The operation to use | |
839a51c8 MS |
262 | OPERATION cancel-job |
263 | RESOURCE /jobs | |
ef416fc2 | 264 | |
265 | # The attributes to send | |
266 | GROUP operation | |
267 | ATTR charset attributes-charset utf-8 | |
268 | ATTR language attributes-natural-language en | |
839a51c8 MS |
269 | ATTR uri job-uri $method://$hostname:$port/jobs/$job-id |
270 | ATTR name requesting-user-name $user | |
ef416fc2 | 271 | |
272 | # What statuses are OK? | |
273 | STATUS successful-ok | |
274 | ||
275 | # What attributes do we expect? | |
276 | EXPECT attributes-charset | |
277 | EXPECT attributes-natural-language | |
278 | } | |
279 | { | |
280 | # The name of the test... | |
839a51c8 | 281 | NAME "Get Job List on Test1" |
ef416fc2 | 282 | |
283 | # The operation to use | |
284 | OPERATION get-jobs | |
839a51c8 | 285 | RESOURCE /printers/Test1 |
ef416fc2 | 286 | |
287 | # The attributes to send | |
288 | GROUP operation | |
289 | ATTR charset attributes-charset utf-8 | |
290 | ATTR language attributes-natural-language en | |
839a51c8 | 291 | ATTR uri printer-uri $method://$hostname:$port/printers/Test1 |
ef416fc2 | 292 | |
293 | # What statuses are OK? | |
294 | STATUS successful-ok | |
295 | ||
296 | # What attributes do we expect? | |
297 | EXPECT attributes-charset | |
298 | EXPECT attributes-natural-language | |
ef416fc2 | 299 | } |
300 | { | |
301 | # The name of the test... | |
839a51c8 | 302 | NAME "Get All Jobs" |
ef416fc2 | 303 | |
304 | # The operation to use | |
839a51c8 | 305 | OPERATION get-jobs |
ef416fc2 | 306 | RESOURCE /jobs |
307 | ||
308 | # The attributes to send | |
309 | GROUP operation | |
310 | ATTR charset attributes-charset utf-8 | |
311 | ATTR language attributes-natural-language en | |
839a51c8 | 312 | ATTR uri job-uri $method://$hostname:$port/jobs |
ef416fc2 | 313 | |
314 | # What statuses are OK? | |
315 | STATUS successful-ok | |
316 | ||
317 | # What attributes do we expect? | |
318 | EXPECT attributes-charset | |
319 | EXPECT attributes-natural-language | |
839a51c8 MS |
320 | EXPECT job-uri |
321 | EXPECT job-id | |
322 | EXPECT job-state | |
ef416fc2 | 323 | } |
324 | ||
325 | # | |
75bd9771 | 326 | # End of "$Id: 4.3-job-ops.test 7550 2008-05-12 16:40:40Z mike $" |
ef416fc2 | 327 | # |