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