# bo29-A.test - include file for use with BO29.test Cancel-Job test # Test that job was really canceled. # Version 0.1 # Last revised by Xerox Corporation on 99-02-28 13:00 PST. # Copyright (c) 1998, 1999 by Xerox Corporation. All rights reserved. # User is granted the right to modify this file for use with # the IPP Server Test Tool, as described in the file # LICENSE-IppTest.txt. # # The calling program has already set the two symbols: # first-job-id - job-id of job to be tested to see if canceled # first-job-uri - job-uri of job to be tested to see if canceled # IfNDef first-job-id Echo 'ERROR IN SCRIPT: first-job-id symbol not defined; needed by BO29-A.test' Define first-job-id 1 Else IfNDef first-job-uri Define first-job-uri 'http://dummy-url' EndIf # Get all job attributes - be forgiving Get-Job-Attributes \ target: $target, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ printer-uri: $target, \ job-id: $first-job-id \ ) \ ) \ @ Check that the canceled job $first-job-id is NOW in the canceled state @ or the canceled job $first-job-id is no longer present @ status = client-error-not-found (0x0406) or @ status = client-error-gone (0x0407) Expect Response \ first-status-code = status-code: successful-ok | \ client-error-not-found | client-error-gone, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: *, \ ... \ ), \ ... \ ) @ If Get-Job-Attributes for $first-job-id returned success, @ meaning there still is a job, test that job is in 'canceled' state If [$first-status-code: successful-ok] Expect Response \ status-code: successful-ok, \ attributes: ( \ Operation: ( \ ... \ ), \ Job: ( \ job-uri: $first-job-uri, \ job-id: $first-job-id, \ job-state: canceled, \ ... \ ), \ ) EndIf # Now try by job-uri: Get-Job-Attributes \ target: $first-job-uri, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ job-uri: $first-job-uri \ ) \ ) \ @ Check that the canceled job $first-job-uri is NOW in the canceled state @ or the canceled job $first-job-id is no longer present @ status = client-error-not-found (0x0406) or @ status = client-error-gone (0x0407) Expect Response \ first-status-code = status-code: successful-ok | \ client-error-not-found | client-error-gone, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: *, \ ... \ ), \ ... \ ) @ If Get-Job-Attributes for $first-job-uri returned success, @ meaning there still is a job, test that job is in 'canceled' state If [$first-status-code: successful-ok] Expect Response \ status-code: successful-ok, \ attributes: ( \ Operation: ( \ ... \ ), \ Job: ( \ job-uri: $first-job-uri, \ job-id: $first-job-id, \ job-state: canceled, \ ... \ ), \ ) EndIf @ The "Model and Semantics" requires that job MUST be canceled @ Record the results and behavior in section 4.8. @ EndIf