#
-# "$Id: 4.4-subscription-ops.test 5833 2006-08-16 20:05:58Z mike $"
+# Verify that the CUPS subscription operations work.
#
-# Verify that the CUPS subscription operations work.
+# Copyright © 2007-2019 by Apple Inc.
+# Copyright © 2001-2006 by Easy Software Products. All rights reserved.
+#
+# Licensed under Apache License v2.0. See the file "LICENSE" for more
+# information.
#
{
# The name of the test...
GROUP operation
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
- ATTR uri printer-uri $method://$hostname:$port/printers/Test1
+ ATTR uri printer-uri $scheme://$hostname:$port/printers/Test1
+ ATTR name requesting-user-name $user
GROUP subscription
- ATTR uri notify-recipient testnotify://
+ ATTR uri notify-recipient-uri testnotify://
ATTR keyword notify-events printer-state-changed
ATTR integer notify-lease-duration 5
# The name of the test...
NAME "Verify Subscription Expiration"
- # Delay test for 6 seconds to allow lease to expire...
- DELAY 6
+ # Delay test for 7 seconds to allow lease to expire...
+ DELAY 7
# The operation to use
OPERATION Get-Subscription-Attributes
GROUP operation
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
- ATTR uri printer-uri $method://$hostname:$port/printers/Test1
+ ATTR uri printer-uri $scheme://$hostname:$port/printers/Test1
ATTR integer notify-subscription-id $notify-subscription-id
+ ATTR name requesting-user-name $user
# What statuses are OK?
STATUS client-error-not-found
GROUP operation
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
- ATTR uri printer-uri $method://$hostname:$port/printers/Test1
+ ATTR uri printer-uri $scheme://$hostname:$port/printers/Test1
+ ATTR name requesting-user-name $user
GROUP subscription
- ATTR uri notify-recipient testnotify://
+ ATTR uri notify-recipient-uri testnotify://
ATTR keyword notify-events printer-state-changed
ATTR integer notify-lease-duration 5
GROUP subscription
- ATTR uri notify-recipient testnotify://
+ ATTR uri notify-recipient-uri testnotify://
ATTR keyword notify-events printer-config-changed
ATTR integer notify-lease-duration 5
GROUP operation
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
- ATTR uri printer-uri $method://$hostname:$port/printers/Test1
+ ATTR uri printer-uri $scheme://$hostname:$port/printers/Test1
+ ATTR name requesting-user-name $user
# What statuses are OK?
STATUS successful-ok
EXPECT notify-events
DISPLAY notify-events
}
+{
+ # The name of the test...
+ NAME "Check MaxSubscriptions limits"
-#
-# End of "$Id: 4.4-subscription-ops.test 5833 2006-08-16 20:05:58Z mike $"
-#
+ # The operation to use
+ OPERATION Create-Printer-Subscription
+ RESOURCE /
+
+ # The attributes to send
+ GROUP operation
+ ATTR charset attributes-charset utf-8
+ ATTR language attributes-natural-language en
+ ATTR uri printer-uri $scheme://$hostname:$port/printers/Test1
+ ATTR name requesting-user-name $user
+
+ GROUP subscription
+ ATTR uri notify-recipient-uri testnotify://
+ ATTR keyword notify-events printer-state-changed
+ ATTR integer notify-lease-duration 5
+
+ # What statuses are OK?
+ STATUS client-error-too-many-subscriptions
+
+ # What attributes do we expect?
+ EXPECT attributes-charset
+ EXPECT attributes-natural-language
+}