Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
The third leg of addition of test files.
The following test files have been added:

allocate-printer-resources.test
cancel-subscription.test
create-job-withJobTemplate.test
get-printer-attributes-all.test
get-printer-attributes-job-template.test
get-printer-attributes-printer-description.test
get-printer-resources.test
get-printers.test
print-job-withJobTemplate.test
print-uri-withJobTemplate.test
register-output-device.test
renew-subscription.test
set-resource-attributes.test
set-system-attributes-default-configured.test
set-system-attributes-general.test
set-system-attributes-power-calendar.test
set-system-attributes-power-event.test
set-system-attributes-power-timeout.test
set-system-attributes-system-contact.test
set-system-attributes-xri-uri.test
  • Loading branch information
aakashlahoti committed Aug 26, 2019
1 parent fa674b5 commit 0eacb4e
Show file tree
Hide file tree
Showing 20 changed files with 830 additions and 0 deletions.
31 changes: 31 additions & 0 deletions allocate-printer-resources.test
@@ -0,0 +1,31 @@
#
# Script to allocate a resource to a printer object
#
# A top-level file/immediate caller will provide the values for $uri: system-uri, $resource-ids, $printer-id
#
# Usage ./ipptool -d uri={system-uri} resource-ids={value} printer-id={value} allocate-printer-resources.test

{
NAME "Allocate-Printer-Resources $resource-ids to Printer $printer-id"

OPERATION Allocate-Printer-Resources
VERSION 2.0

GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR naturalLanguage attributes-natural-language en
ATTR uri system-uri $uri
ATTR 1setOf integer(1:MAX) resource-ids $resource-ids
ATTR integer(1:65535) printer-id $printer-id

STATUS successful-ok

EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag
EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag
EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag
EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag

EXPECT printer-resource-ids OF-TYPE 1setOf integer(1:MAX) IN-GROUP printer-attributes-tag DEFINE_VALUE printer-resource-ids

DISPLAY printer-resource-ids
}
29 changes: 29 additions & 0 deletions cancel-subscription.test
@@ -0,0 +1,29 @@
#
# Script to delete a subscription object, this prevents referencing this object in the future

#!!! Unfortunately in the current setting we can't check if the returned attributes are exactly what is required . Which means that the user has to manually check if all the feasible attributes are returned.

# A top-level file/immediate caller will provide the values for $uri: system-uri, $notify-subscription-id

# Usage ./ipptool -d uri={system-uri} notify-subscription-id={value} cancel-subscription.test

{
NAME "Cancel the subscription object with id: $notify-subscription-id on the system: $uri"

OPERATION Cancel-Subscription
VERSION 2.0

GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR naturalLanguage attributes-natural-language en
ATTR uri system-uri $uri
ATTR integer(1:MAX) notify-subscription-id $notify-subscription-id

STATUS successful-ok

EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag
EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag
?EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag
?EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag

}
32 changes: 32 additions & 0 deletions create-job-withJobTemplate.test
@@ -0,0 +1,32 @@
# Script to create a job object using a template-job-resource

# A top-level file/immediate caller will provide the values for $uri: system-uri, $resources-ids

# Usage ./ipptool -d uri={system-uri} resources-ids={values} create-job-withJobTemplate.test
# Do include a template-job-resource in the resource-ids. You can include only one such template-job-resource. Also resource-ids may consist of other static-resources.

{
NAME "Create a Job-Object with template-job and other resources : $resource-ids, on the system: $system-uri"

OPERATION Create-Job
VERSION 2.0

GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR naturalLanguage attributes-natural-language en
ATTR uri system-uri $uri
ATTR 1setOf integer(1:MAX) resources-ids $resources-ids

STATUS successful-ok

EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag
EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag
?EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag
?EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag

EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag
EXPECT job-id OF-TYPE integer(1:MAX) IN-GROUP job-attributes-tag
EXPECT job-state OF-TYPE type1 enum IN-GROUP job-attributes-tag
EXPECT job-state-reasons OF-TYPE 1setOf type2 keywordIN-GROUP job-attributes-tag

}
67 changes: 67 additions & 0 deletions get-printer-attributes-all.test
@@ -0,0 +1,67 @@
#
# Script to query the default printer to enlist 'all' its attributes
# This test takes the requested attributes with value 'all' and returns its attributes in regard to the access control mechanisms

#!!! Unfortunately in the current setting we can't check if the returned attributes are exactly what is required . Which means that the user has to manually check if all the feasible attributes are returned.

# It is highly recommended that the tester provides the document-format attribute. If the union of all supports is required, you should provide the value of the attribute as 'application/octet-stream'.

# A top-level file/immediate caller will provide the values for $uri: system-uri, $document-format

# Usage ./ipptool -d uri={system-uri} notify-subscription-id={value} get-printer-attributes-all.test

{
NAME "Get all the default printer attributes in the system: $system-uri, under access control"

OPERATION Get-Printer-Attributes
VERSION 2.0

GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR naturalLanguage attributes-natural-language en
ATTR uri system-uri $uri
ATTR 1setOf keyword requested-attributes all
ATTR mimeMediaType document-format $document-format

STATUS successful-ok

EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag
EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag
?EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag
?EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag

#job-template-attributes
EXPECT job-priority OF-TYPE integer IN-GROUP job-attributes-tag
EXPECT job-hold-until OF-TYPE type3 keyword|name IN-GROUP job-attributes-tag
EXPECT job-sheets OF-TYPE type3 keyword|name IN-GROUP job-attributes-tag
EXPECT multiple-document-handling OF-TYPE type2 keyword IN-GROUP job-attributes-tag
EXPECT copies OF-TYPE integer (1:MAX) IN-GROUP job-attributes-tag
EXPECT finishings OF-TYPE 1setOf type2 enum IN-GROUP job-attributes-tag
EXPECT sides OF-TYPE type2 keyword IN-GROUP job-attributes-tag
EXPECT orientation-requested OF-TYPE type2 enum IN-GROUP job-attributes-tag
EXPECT number-up OF-TYPE integer (1:MAX) IN-GROUP job-attributes-tag
EXPECT media OF-TYPE type3 keyword|name IN-GROUP job-attributes-tag
EXPECT printer-resolution OF-TYPE resolution IN-GROUP job-attributes-tag
EXPECT print-quality OF-TYPE type2 enum IN-GROUP job-attributes-tag

#required-printer-description-attributes
EXPECT printer-uri-supported OF-TYPE 1setOf uri IN-GROUP printer-attributes-tag
EXPECT uri-security-supported OF-TYPE 1setOf type2 keyword IN-GROUP printer-attributes-tag
EXPECT uri-authentication-supported OF-TYPE 1setOf type2 keyword IN-GROUP printer-attributes-tag
EXPECT printer-name OF-TYPE name IN-GROUP printer-attributes-tag
EXPECT printer-state OF-TYPE type1 enum IN-GROUP printer-attributes-tag
EXPECT printer-state-reasons OF-TYPE 1setOf type2 keyword IN-GROUP printer-attributes-tag
EXPECT ipp-versions-supported OF-TYPE 1setOf type2 keyword IN-GROUP printer-attributes-tag
EXPECT operations-supported OF-TYPE 1setOf type2 enum IN-GROUP printer-attributes-tag
EXPECT charset-configured OF-TYPE charset IN-GROUP printer-attributes-tag
EXPECT charset-supported OF-TYPE 1setOf charset IN-GROUP printer-attributes-tag
EXPECT natural-language-configured OF-TYPE naturalLanguage IN-GROUP printer-attributes-tag
EXPECT generated-natural-language-supported OF-TYPE 1setOf naturalLanguage IN-GROUP printer-attributes-tag
EXPECT document-format-default OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag
EXPECT document-format-supported OF-TYPE 1setOf mimeMediaType IN-GROUP printer-attributes-tag
EXPECT printer-is-accepting-jobs OF-TYPE boolean IN-GROUP printer-attributes-tag
EXPECT queued-job-count OF-TYPE integer (0:MAX) IN-GROUP printer-attributes-tag
EXPECT pdl-override-supported OF-TYPE type2 keyword IN-GROUP printer-attributes-tag
EXPECT printer-up-time OF-TYPE integer (1:MAX) IN-GROUP printer-attributes-tag
EXPECT compression-supported OF-TYPE 1setOf type3 keyword IN-GROUP printer-attributes-tag
}
46 changes: 46 additions & 0 deletions get-printer-attributes-job-template.test
@@ -0,0 +1,46 @@
#
# Script to query the default printer to enlist its job-template attributes
# This test takes the requested attributes with value 'job-template' and returns its attributes in regard to the access control mechanisms

#!!! Unfortunately in the current setting we can't check if the returned attributes are exactly what is required . Which means that the user has to manually check if all the feasible attributes are returned.

# It is highly recommended that the tester provides the document-format attribute. If the union of all supports is required, you should provide the value of the attribute as 'application/octet-stream'.

# A top-level file/immediate caller will provide the values for $uri: system-uri, $document-format

# Usage ./ipptool -d uri={system-uri} notify-subscription-id={value} get-printer-attributes-job-template.test

{
NAME "Get the default printer job-template attributes in the system: $system-uri, under access control"

OPERATION Get-Printer-Attributes
VERSION 2.0

GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR naturalLanguage attributes-natural-language en
ATTR uri system-uri $uri
ATTR 1setOf keyword requested-attributes job-template
ATTR mimeMediaType document-format $document-format

STATUS successful-ok

EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag
EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag
?EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag
?EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag

#job-template-attributes
EXPECT job-priority OF-TYPE integer IN-GROUP job-attributes-tag
EXPECT job-hold-until OF-TYPE type3 keyword|name IN-GROUP job-attributes-tag
EXPECT job-sheets OF-TYPE type3 keyword|name IN-GROUP job-attributes-tag
EXPECT multiple-document-handling OF-TYPE type2 keyword IN-GROUP job-attributes-tag
EXPECT copies OF-TYPE integer (1:MAX) IN-GROUP job-attributes-tag
EXPECT finishings OF-TYPE 1setOf type2 enum IN-GROUP job-attributes-tag
EXPECT sides OF-TYPE type2 keyword IN-GROUP job-attributes-tag
EXPECT orientation-requested OF-TYPE type2 enum IN-GROUP job-attributes-tag
EXPECT number-up OF-TYPE integer (1:MAX) IN-GROUP job-attributes-tag
EXPECT media OF-TYPE type3 keyword|name IN-GROUP job-attributes-tag
EXPECT printer-resolution OF-TYPE resolution IN-GROUP job-attributes-tag
EXPECT print-quality OF-TYPE type2 enum IN-GROUP job-attributes-tag
}
53 changes: 53 additions & 0 deletions get-printer-attributes-printer-description.test
@@ -0,0 +1,53 @@
#
# Script to query the default printer to enlist its printer-description attributes
# This test takes the requested attributes with value 'printer-description' and returns its attributes in regard to the access control mechanisms

#!!! Unfortunately in the current setting we can't check if the returned attributes are exactly what is required . Which means that the user has to manually check if all the feasible attributes are returned.

# It is highly recommended that the tester provides the document-format attribute. If the union of all supports is required, you should provide the value of the attribute as 'application/octet-stream'.

# A top-level file/immediate caller will provide the values for $uri: system-uri, $document-format

# Usage ./ipptool -d uri={system-uri} notify-subscription-id={value} get-printer-attributes-printer-description.test

{
NAME "Get the default printer printer-description attributes in the system: $system-uri, under access control"

OPERATION Get-Printer-Attributes
VERSION 2.0

GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR naturalLanguage attributes-natural-language en
ATTR uri system-uri $uri
ATTR 1setOf keyword requested-attributes printer-description
ATTR mimeMediaType document-format $document-format

STATUS successful-ok

EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag
EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag
?EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag
?EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag

#required-printer-description-attributes
EXPECT printer-uri-supported OF-TYPE 1setOf uri IN-GROUP printer-attributes-tag
EXPECT uri-security-supported OF-TYPE 1setOf type2 keyword IN-GROUP printer-attributes-tag
EXPECT uri-authentication-supported OF-TYPE 1setOf type2 keyword IN-GROUP printer-attributes-tag
EXPECT printer-name OF-TYPE name IN-GROUP printer-attributes-tag
EXPECT printer-state OF-TYPE type1 enum IN-GROUP printer-attributes-tag
EXPECT printer-state-reasons OF-TYPE 1setOf type2 keyword IN-GROUP printer-attributes-tag
EXPECT ipp-versions-supported OF-TYPE 1setOf type2 keyword IN-GROUP printer-attributes-tag
EXPECT operations-supported OF-TYPE 1setOf type2 enum IN-GROUP printer-attributes-tag
EXPECT charset-configured OF-TYPE charset IN-GROUP printer-attributes-tag
EXPECT charset-supported OF-TYPE 1setOf charset IN-GROUP printer-attributes-tag
EXPECT natural-language-configured OF-TYPE naturalLanguage IN-GROUP printer-attributes-tag
EXPECT generated-natural-language-supported OF-TYPE 1setOf naturalLanguage IN-GROUP printer-attributes-tag
EXPECT document-format-default OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag
EXPECT document-format-supported OF-TYPE 1setOf mimeMediaType IN-GROUP printer-attributes-tag
EXPECT printer-is-accepting-jobs OF-TYPE boolean IN-GROUP printer-attributes-tag
EXPECT queued-job-count OF-TYPE integer (0:MAX) IN-GROUP printer-attributes-tag
EXPECT pdl-override-supported OF-TYPE type2 keyword IN-GROUP printer-attributes-tag
EXPECT printer-up-time OF-TYPE integer (1:MAX) IN-GROUP printer-attributes-tag
EXPECT compression-supported OF-TYPE 1setOf type3 keyword IN-GROUP printer-attributes-tag
}
50 changes: 50 additions & 0 deletions get-printer-resources.test
@@ -0,0 +1,50 @@
#
# Script to find resources of a printer on the system.
# This test takes the following attributes for input:
# printer-uri
# resource-ids
# first-index
# limit
# requested-attributes
# resource-formats
# resource-states
# resource-types

#!!! Unfortunately in the current setting we can't check if the returned attributes are exactly what is required . Which means that the user has to manually check if all the feasible attributes are returned.

# A top-level file/immediate caller will provide the values for $uri: system-uri, $resource-ids, $first-index, $limit, $requested-attributes, $resource-formats, $resource-states, $resource-types


# Usage ./ipptool -d uri={system-uri} resource-ids={value} first-index={value} limit={value} requested-attributes={value} resource-formats={value} resource-states={value} resource-types={value} get-printer-resources.test

{
NAME "Search for Resources of a Printer"

OPERATION Get-Printer-Resources
VERSION 2.0

GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR naturalLanguage attributes-natural-language en
ATTR uri printer-uri $uri
ATTR 1setOf (integer(1:MAX)) resource-ids $resource-ids
ATTR integer(1:MAX) first-index $first-index
ATTR integer(1:MAX) limit $limit
ATTR 1setOf (type2 keyword) requested-attributes $requested-attributes
ATTR 1setOf (mimeMediaType) resource-formats $resource-formats
ATTR 1setOf (type1 enum) resource-states $resource-states
ATTR 1setOf (type2 keyword) resource-types $resource-types

STATUS successful-ok

EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag
EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag
EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag
EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag

EXPECT resource-id OF_TYPE (integer(1:MAX)) IN-GROUP resource-attributes-tag
EXPECT resource-uuid OF-TYPE uri(45) IN-GROUP resource-attributes-tag
EXPECT resource-state OF-TYPE (type1 enum) IN-GROUP resource-attributes-tag
EXPECT resource-state-reasons OF-TYPE (1setOf type2 keyword) IN-GROUP resource-attributes-tag

}
55 changes: 55 additions & 0 deletions get-printers.test
@@ -0,0 +1,55 @@
#
# Script to find resources of a printer on the system.
# This test takes the following attributes for input:
# printer-ids
# first-index
# limit
# printer-geo-location
# printer-location
# printer-service-type
# requested-attributes
# document-format
# which-printers

#!!! Unfortunately in the current setting we can't check if the returned attributes are exactly what is required . Which means that the user has to manually check if all the feasible attributes are returned.

# A top-level file/immediate caller will provide the values for $uri: system-uri, $printer-ids, $first-index, $limit,
$printer-geo-location, $printer-location, $printer-service-type, $requested-attributes, $document-format, $which-printers,

# Usage ./ipptool -d uri={system-uri} printer-ids={value} first-index={value} limit={value} printer-geo-location={value} printer-location={value} printer-service-type={value} requested-attributes={value} document-format={value} which-printers={value} get-printers.test

{
NAME "Search for Printers"

OPERATION Get-Printers
VERSION 2.0

GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR naturalLanguage attributes-natural-language en
ATTR uri system-uri $uri
ATTR 1setOf (integer(1:65535)) printer-ids $printer-ids
ATTR integer(1:MAX) first-index $first-index
ATTR integer(1:MAX) limit $limit
ATTR uri printer-geo-location $printer-geo-location
ATTR text(127) printer-location $printer-location
ATTR 1setOf type2 keyword printer-service-type $printer-service-type
ATTR 1setOf type2 keyword requested-attributes $requested-attributes
ATTR mimeMediaType document-format $document-format
ATTR type2 keyword which-printers $which-printers

STATUS successful-ok

EXPECT attributes-charset OF-TYPE charset IN-GROUP operation-attributes-tag
EXPECT attributes-natural-language OF-TYPE naturalLanguage IN-GROUP operation-attributes-tag
EXPECT status-message OF-TYPE text(255) IN-GROUP operation-attributes-tag
EXPECT detailed-status-message OF-TYPE text(MAX) IN-GROUP operation-attributes-tag

EXPECT printer-id OF_TYPE (integer(1:65535)) IN-GROUP printer-attributes-tag
EXPECT printer-uuid OF-TYPE uri(45) IN-GROUP printer-attributes-tag
EXPECT printer-xri-supported OF-TYPE (1setOf collection) IN-GROUP printer-attributes-tag
EXPECT printer-state OF-TYPE (type1 enum) IN-GROUP printer-attributes-tag
EXPECT printer-state-reasons OF-TYPE (1setOf type2 keyword) IN-GROUP printer-attributes-tag
EXPECT printer-is-accepting-jobs OF-TYPE boolean IN-GROUP printer-attributes-tag

}

0 comments on commit 0eacb4e

Please sign in to comment.