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
19 ATTR name requesting-user-name $user
22 ATTR uri notify-recipient-uri testnotify://
23 ATTR keyword notify-events printer-state-changed
24 ATTR integer notify-lease-duration 5
26 # What statuses are OK?
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
36 # The name of the test...
37 NAME "Verify Subscription Expiration"
39 # Delay test for 7 seconds to allow lease to expire...
42 # The operation to use
43 OPERATION Get-Subscription-Attributes
46 # The attributes to send
48 ATTR charset attributes-charset utf-8
49 ATTR language attributes-natural-language en
50 ATTR uri printer-uri $scheme://$hostname:$port/printers/Test1
51 ATTR integer notify-subscription-id $notify-subscription-id
52 ATTR name requesting-user-name $user
54 # What statuses are OK?
55 STATUS client-error-not-found
57 # What attributes do we expect?
58 EXPECT attributes-charset
59 EXPECT attributes-natural-language
62 # The name of the test...
63 NAME "Add 2 Printer Subscriptions w/Lease"
65 # The operation to use
66 OPERATION Create-Printer-Subscription
69 # The attributes to send
71 ATTR charset attributes-charset utf-8
72 ATTR language attributes-natural-language en
73 ATTR uri printer-uri $scheme://$hostname:$port/printers/Test1
74 ATTR name requesting-user-name $user
77 ATTR uri notify-recipient-uri testnotify://
78 ATTR keyword notify-events printer-state-changed
79 ATTR integer notify-lease-duration 5
82 ATTR uri notify-recipient-uri testnotify://
83 ATTR keyword notify-events printer-config-changed
84 ATTR integer notify-lease-duration 5
86 # What statuses are OK?
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
96 # The name of the test...
97 NAME "List Printer Subscriptions"
99 # The operation to use
100 OPERATION Get-Subscriptions
103 # The attributes to send
105 ATTR charset attributes-charset utf-8
106 ATTR language attributes-natural-language en
107 ATTR uri printer-uri $scheme://$hostname:$port/printers/Test1
108 ATTR name requesting-user-name $user
110 # What statuses are OK?
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
121 DISPLAY notify-events
124 # The name of the test...
125 NAME "Check MaxSubscriptions limits"
127 # The operation to use
128 OPERATION Create-Printer-Subscription
131 # The attributes to send
133 ATTR charset attributes-charset utf-8
134 ATTR language attributes-natural-language en
135 ATTR uri printer-uri $scheme://$hostname:$port/printers/Test1
136 ATTR name requesting-user-name $user
139 ATTR uri notify-recipient-uri testnotify://
140 ATTR keyword notify-events printer-state-changed
141 ATTR integer notify-lease-duration 5
143 # What statuses are OK?
144 STATUS client-error-too-many-subscriptions
146 # What attributes do we expect?
147 EXPECT attributes-charset
148 EXPECT attributes-natural-language
152 # End of "$Id: 4.4-subscription-ops.test 6635 2007-07-09 20:34:48Z mike $"