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