2 # "$Id: 4.4-subscription-ops.test 6635 2007-07-09 20:34:48Z mike $"
4 # Verify that the CUPS subscription operations work.
7 # The name of the test...
8 NAME "Add Printer Subscription w/Lease"
10 # The operation to use
11 OPERATION Create-Printer-Subscription
14 # The attributes to send
16 ATTR charset attributes-charset utf-8
17 ATTR language attributes-natural-language en
18 ATTR uri printer-uri $scheme://$hostname:$port/printers/Test1
21 ATTR uri notify-recipient-uri testnotify://
22 ATTR keyword notify-events printer-state-changed
23 ATTR integer notify-lease-duration 5
25 # What statuses are OK?
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
35 # The name of the test...
36 NAME "Verify Subscription Expiration"
38 # Delay test for 7 seconds to allow lease to expire...
41 # The operation to use
42 OPERATION Get-Subscription-Attributes
45 # The attributes to send
47 ATTR charset attributes-charset utf-8
48 ATTR language attributes-natural-language en
49 ATTR uri printer-uri $scheme://$hostname:$port/printers/Test1
50 ATTR integer notify-subscription-id $notify-subscription-id
52 # What statuses are OK?
53 STATUS client-error-not-found
55 # What attributes do we expect?
56 EXPECT attributes-charset
57 EXPECT attributes-natural-language
60 # The name of the test...
61 NAME "Add 2 Printer Subscriptions w/Lease"
63 # The operation to use
64 OPERATION Create-Printer-Subscription
67 # The attributes to send
69 ATTR charset attributes-charset utf-8
70 ATTR language attributes-natural-language en
71 ATTR uri printer-uri $scheme://$hostname:$port/printers/Test1
74 ATTR uri notify-recipient-uri testnotify://
75 ATTR keyword notify-events printer-state-changed
76 ATTR integer notify-lease-duration 5
79 ATTR uri notify-recipient-uri testnotify://
80 ATTR keyword notify-events printer-config-changed
81 ATTR integer notify-lease-duration 5
83 # What statuses are OK?
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
93 # The name of the test...
94 NAME "List Printer Subscriptions"
96 # The operation to use
97 OPERATION Get-Subscriptions
100 # The attributes to send
102 ATTR charset attributes-charset utf-8
103 ATTR language attributes-natural-language en
104 ATTR uri printer-uri $scheme://$hostname:$port/printers/Test1
106 # What statuses are OK?
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
117 DISPLAY notify-events
120 # The name of the test...
121 NAME "Check MaxSubscriptions limits"
123 # The operation to use
124 OPERATION Create-Printer-Subscription
127 # The attributes to send
129 ATTR charset attributes-charset utf-8
130 ATTR language attributes-natural-language en
131 ATTR uri printer-uri $scheme://$hostname:$port/printers/Test1
134 ATTR uri notify-recipient-uri testnotify://
135 ATTR keyword notify-events printer-state-changed
136 ATTR integer notify-lease-duration 5
138 # What statuses are OK?
139 STATUS client-error-too-many-subscriptions
141 # What attributes do we expect?
142 EXPECT attributes-charset
143 EXPECT attributes-natural-language
147 # End of "$Id: 4.4-subscription-ops.test 6635 2007-07-09 20:34:48Z mike $"