4 # Verify that the CUPS printer operations work.
7 # The name of the test...
8 NAME "Add Printer Test1"
10 # The operation to use
11 OPERATION cups-add-printer
14 # The attributes to send
16 ATTR charset attributes-charset utf-8
17 ATTR language attributes-natural-language en
18 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
22 # What statuses are OK?
25 # What attributes do we expect?
26 EXPECT attributes-charset
27 EXPECT attributes-natural-language
30 # The name of the test...
31 NAME "Verify Printer Test1 Added"
33 # The operation to use
34 OPERATION get-printer-attributes
37 # The attributes to send
39 ATTR charset attributes-charset utf-8
40 ATTR language attributes-natural-language en
41 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
43 # What statuses are OK?
46 # What attributes do we expect?
47 EXPECT attributes-charset
48 EXPECT attributes-natural-language
51 # The name of the test...
52 NAME "Delete Printer Test1"
54 # The operation to use
55 OPERATION cups-delete-printer
58 # The attributes to send
60 ATTR charset attributes-charset utf-8
61 ATTR language attributes-natural-language en
62 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
64 # What statuses are OK?
67 # What attributes do we expect?
68 EXPECT attributes-charset
69 EXPECT attributes-natural-language
72 # The name of the test...
73 NAME "Verify Printer Test1 Deleted"
75 # The operation to use
76 OPERATION get-printer-attributes
79 # The attributes to send
81 ATTR charset attributes-charset utf-8
82 ATTR language attributes-natural-language en
83 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
85 # What statuses are OK?
86 STATUS client-error-not-found
88 # What attributes do we expect?
89 EXPECT attributes-charset
90 EXPECT attributes-natural-language
93 # The name of the test...
94 NAME "Subscribe to Printer Events"
96 # The operation to use
97 OPERATION Create-Printer-Subscription
100 # The attributes to send
102 ATTR charset attributes-charset utf-8
103 ATTR language attributes-natural-language en
104 ATTR uri printer-uri $method://$hostname:$port/
105 ATTR name requesting-user-name $user
108 ATTR uri notify-recipient-uri testnotify://
109 ATTR keyword notify-events printer-added,printer-modified,printer-deleted
111 # What statuses are OK?
114 # What attributes do we expect?
115 EXPECT attributes-charset
116 EXPECT attributes-natural-language
117 EXPECT notify-subscription-id
120 # The name of the test...
121 NAME "Add Printer Test2"
123 # The operation to use
124 OPERATION cups-add-printer
127 # The attributes to send
129 ATTR charset attributes-charset utf-8
130 ATTR language attributes-natural-language en
131 ATTR uri printer-uri $method://$hostname:$port/printers/Test2
135 # What statuses are OK?
138 # What attributes do we expect?
139 EXPECT attributes-charset
140 EXPECT attributes-natural-language
143 # The name of the test...
144 NAME "Verify Printer Test2 Added"
146 # The operation to use
147 OPERATION get-printer-attributes
150 # The attributes to send
152 ATTR charset attributes-charset utf-8
153 ATTR language attributes-natural-language en
154 ATTR uri printer-uri $method://$hostname:$port/printers/Test2
156 # What statuses are OK?
159 # What attributes do we expect?
160 EXPECT attributes-charset
161 EXPECT attributes-natural-language
164 # The name of the test...
165 NAME "Modify Printer Test2"
167 # The operation to use
168 OPERATION cups-add-printer
171 # The attributes to send
173 ATTR charset attributes-charset utf-8
174 ATTR language attributes-natural-language en
175 ATTR uri printer-uri $method://$hostname:$port/printers/Test2
178 ATTR uri device-uri file:/tmp/Test2
179 ATTR enum printer-state 3
180 ATTR boolean printer-is-accepting-jobs true
182 # What statuses are OK?
185 # What attributes do we expect?
186 EXPECT attributes-charset
187 EXPECT attributes-natural-language
190 # The name of the test...
191 NAME "Re-Add Printer Test1"
193 # The operation to use
194 OPERATION cups-add-printer
197 # The attributes to send
199 ATTR charset attributes-charset utf-8
200 ATTR language attributes-natural-language en
201 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
204 ATTR uri device-uri file:/tmp/Test1
205 ATTR enum printer-state 3
206 ATTR boolean printer-is-accepting-jobs true
207 ATTR text printer-info "Test Printer 1"
211 # What statuses are OK?
214 # What attributes do we expect?
215 EXPECT attributes-charset
216 EXPECT attributes-natural-language
219 # The name of the test...
220 NAME "Verify Printer Test1 Re-Added"
222 # The operation to use
223 OPERATION get-printer-attributes
226 # The attributes to send
228 ATTR charset attributes-charset utf-8
229 ATTR language attributes-natural-language en
230 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
232 # What statuses are OK?
235 # What attributes do we expect?
236 EXPECT attributes-charset
237 EXPECT attributes-natural-language
240 # The name of the test...
241 NAME "Get Default Printer with no default set"
243 # The operation to use
244 OPERATION cups-get-default
247 # The attributes to send
249 ATTR charset attributes-charset utf-8
250 ATTR language attributes-natural-language en
252 # What statuses are OK?
253 STATUS client-error-not-found
255 # What attributes do we expect?
256 EXPECT attributes-charset
257 EXPECT attributes-natural-language
260 # The name of the test...
261 NAME "Set Default Printer to Test1"
263 # The operation to use
264 OPERATION cups-set-default
267 # The attributes to send
269 ATTR charset attributes-charset utf-8
270 ATTR language attributes-natural-language en
271 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
273 # What statuses are OK?
276 # What attributes do we expect?
277 EXPECT attributes-charset
278 EXPECT attributes-natural-language
281 # The name of the test...
282 NAME "Get Default Printer"
284 # The operation to use
285 OPERATION cups-get-default
288 # The attributes to send
290 ATTR charset attributes-charset utf-8
291 ATTR language attributes-natural-language en
293 # What statuses are OK?
296 # What attributes do we expect?
297 EXPECT attributes-charset
298 EXPECT attributes-natural-language
300 EXPECT printer-uri-supported
303 # The name of the test...
304 NAME "Get IPP/2.x Attributes for Printer Test1"
306 # The operation to use
307 OPERATION get-printer-attributes
310 # The IPP version to use
313 # The attributes to send
315 ATTR charset attributes-charset utf-8
316 ATTR language attributes-natural-language en
317 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
319 # What statuses are OK?
322 # What attributes do we expect?
323 EXPECT media-col-default