]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
f899b121 | 2 | # "$Id: 4.4-subscription-ops.test 6379 2007-03-21 14:57:22Z 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 | |
18 | ATTR uri printer-uri $method://$hostname:$port/printers/Test1 | |
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 | ||
38 | # Delay test for 6 seconds to allow lease to expire... | |
39 | DELAY 6 | |
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 | |
49 | ATTR uri printer-uri $method://$hostname:$port/printers/Test1 | |
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 | |
71 | ATTR uri printer-uri $method://$hostname:$port/printers/Test1 | |
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 | |
104 | ATTR uri printer-uri $method://$hostname:$port/printers/Test1 | |
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 | } | |
119 | ||
120 | # | |
f899b121 | 121 | # End of "$Id: 4.4-subscription-ops.test 6379 2007-03-21 14:57:22Z mike $" |
ef416fc2 | 122 | # |