]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
191be31c | 2 | # Verify that the CUPS subscription operations work. |
ef416fc2 | 3 | # |
191be31c MS |
4 | # Copyright © 2007-2013 by Apple Inc. |
5 | # Copyright © 2001-2006 by Easy Software Products. All rights reserved. | |
6 | # | |
7 | # Licensed under Apache License v2.0. See the file "LICENSE" for more | |
8 | # information. | |
ef416fc2 | 9 | # |
10 | { | |
11 | # The name of the test... | |
12 | NAME "Add Printer Subscription w/Lease" | |
13 | ||
14 | # The operation to use | |
15 | OPERATION Create-Printer-Subscription | |
16 | RESOURCE / | |
17 | ||
18 | # The attributes to send | |
19 | GROUP operation | |
20 | ATTR charset attributes-charset utf-8 | |
21 | ATTR language attributes-natural-language en | |
52f6f666 | 22 | ATTR uri printer-uri $scheme://$hostname:$port/printers/Test1 |
10d09e33 | 23 | ATTR name requesting-user-name $user |
ef416fc2 | 24 | |
25 | GROUP subscription | |
f899b121 | 26 | ATTR uri notify-recipient-uri testnotify:// |
ef416fc2 | 27 | ATTR keyword notify-events printer-state-changed |
28 | ATTR integer notify-lease-duration 5 | |
29 | ||
30 | # What statuses are OK? | |
31 | STATUS successful-ok | |
32 | ||
33 | # What attributes do we expect? | |
34 | EXPECT attributes-charset | |
35 | EXPECT attributes-natural-language | |
36 | EXPECT notify-subscription-id | |
37 | DISPLAY notify-subscription-id | |
38 | } | |
39 | { | |
40 | # The name of the test... | |
41 | NAME "Verify Subscription Expiration" | |
42 | ||
bc44d920 | 43 | # Delay test for 7 seconds to allow lease to expire... |
44 | DELAY 7 | |
ef416fc2 | 45 | |
46 | # The operation to use | |
47 | OPERATION Get-Subscription-Attributes | |
48 | RESOURCE / | |
49 | ||
50 | # The attributes to send | |
51 | GROUP operation | |
52 | ATTR charset attributes-charset utf-8 | |
53 | ATTR language attributes-natural-language en | |
52f6f666 | 54 | ATTR uri printer-uri $scheme://$hostname:$port/printers/Test1 |
ef416fc2 | 55 | ATTR integer notify-subscription-id $notify-subscription-id |
10d09e33 | 56 | ATTR name requesting-user-name $user |
ef416fc2 | 57 | |
58 | # What statuses are OK? | |
59 | STATUS client-error-not-found | |
60 | ||
61 | # What attributes do we expect? | |
62 | EXPECT attributes-charset | |
63 | EXPECT attributes-natural-language | |
64 | } | |
65 | { | |
66 | # The name of the test... | |
67 | NAME "Add 2 Printer Subscriptions w/Lease" | |
68 | ||
69 | # The operation to use | |
70 | OPERATION Create-Printer-Subscription | |
71 | RESOURCE / | |
72 | ||
73 | # The attributes to send | |
74 | GROUP operation | |
75 | ATTR charset attributes-charset utf-8 | |
76 | ATTR language attributes-natural-language en | |
52f6f666 | 77 | ATTR uri printer-uri $scheme://$hostname:$port/printers/Test1 |
10d09e33 | 78 | ATTR name requesting-user-name $user |
ef416fc2 | 79 | |
80 | GROUP subscription | |
f899b121 | 81 | ATTR uri notify-recipient-uri testnotify:// |
ef416fc2 | 82 | ATTR keyword notify-events printer-state-changed |
83 | ATTR integer notify-lease-duration 5 | |
84 | ||
85 | GROUP subscription | |
f899b121 | 86 | ATTR uri notify-recipient-uri testnotify:// |
ef416fc2 | 87 | ATTR keyword notify-events printer-config-changed |
88 | ATTR integer notify-lease-duration 5 | |
89 | ||
90 | # What statuses are OK? | |
91 | STATUS successful-ok | |
92 | ||
93 | # What attributes do we expect? | |
94 | EXPECT attributes-charset | |
95 | EXPECT attributes-natural-language | |
96 | EXPECT notify-subscription-id | |
97 | DISPLAY notify-subscription-id | |
98 | } | |
99 | { | |
100 | # The name of the test... | |
101 | NAME "List Printer Subscriptions" | |
102 | ||
103 | # The operation to use | |
104 | OPERATION Get-Subscriptions | |
105 | RESOURCE / | |
106 | ||
107 | # The attributes to send | |
108 | GROUP operation | |
109 | ATTR charset attributes-charset utf-8 | |
110 | ATTR language attributes-natural-language en | |
52f6f666 | 111 | ATTR uri printer-uri $scheme://$hostname:$port/printers/Test1 |
10d09e33 | 112 | ATTR name requesting-user-name $user |
ef416fc2 | 113 | |
114 | # What statuses are OK? | |
115 | STATUS successful-ok | |
116 | ||
117 | # What attributes do we expect? | |
118 | EXPECT attributes-charset | |
119 | EXPECT attributes-natural-language | |
120 | EXPECT notify-subscription-id | |
121 | DISPLAY notify-subscription-id | |
122 | EXPECT notify-printer-uri | |
123 | DISPLAY notify-printer-uri | |
124 | EXPECT notify-events | |
125 | DISPLAY notify-events | |
126 | } | |
52f6f666 MS |
127 | { |
128 | # The name of the test... | |
129 | NAME "Check MaxSubscriptions limits" | |
130 | ||
131 | # The operation to use | |
132 | OPERATION Create-Printer-Subscription | |
133 | RESOURCE / | |
134 | ||
135 | # The attributes to send | |
136 | GROUP operation | |
137 | ATTR charset attributes-charset utf-8 | |
138 | ATTR language attributes-natural-language en | |
139 | ATTR uri printer-uri $scheme://$hostname:$port/printers/Test1 | |
10d09e33 | 140 | ATTR name requesting-user-name $user |
52f6f666 MS |
141 | |
142 | GROUP subscription | |
143 | ATTR uri notify-recipient-uri testnotify:// | |
144 | ATTR keyword notify-events printer-state-changed | |
145 | ATTR integer notify-lease-duration 5 | |
146 | ||
147 | # What statuses are OK? | |
148 | STATUS client-error-too-many-subscriptions | |
149 | ||
150 | # What attributes do we expect? | |
151 | EXPECT attributes-charset | |
152 | EXPECT attributes-natural-language | |
153 | } |