HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-172-31-4-197 6.8.0-1036-aws #38~22.04.1-Ubuntu SMP Fri Aug 22 15:44:33 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/share/cups/ipptool/set-attrs-hold.test
# Test print-job and later job-hold-until attribute
{
	# The name of the test...
	NAME "Disable printer..."

	# The resource to use for the POST
	RESOURCE /admin/

	# The operation to use
	OPERATION pause-printer

	# Attributes, starting in the operation group...
	GROUP operation
	ATTR charset attributes-charset utf-8
	ATTR language attributes-natural-language en
	ATTR uri printer-uri $uri
	ATTR name requesting-user-name $user

	# What statuses are OK?
	STATUS successful-ok
	STATUS successful-ok-ignored-or-substituted-attributes
}

{
	# The name of the test...
	NAME "Print job"

	# The resource to use for the POST
	# RESOURCE /admin

	# The operation to use
	OPERATION print-job

	# Attributes, starting in the operation group...
	GROUP operation
	ATTR charset attributes-charset utf-8
	ATTR language attributes-natural-language en
	ATTR uri printer-uri $uri
	ATTR name requesting-user-name $user
	ATTR mimetype document-format application/postscript

	GROUP job
	ATTR integer copies 1

	FILE ../data/testprint.ps

	# What statuses are OK?
	STATUS successful-ok
	STATUS successful-ok-ignored-or-substituted-attributes

	# What attributes do we expect?
	EXPECT job-id
	EXPECT job-uri
}

{
	# The name of the test...
	NAME "Get job attrs"

	# The resource to use for the POST
	RESOURCE /

	# The operation to use
	OPERATION get-job-attributes

	# Attributes, starting in the operation group...
	GROUP operation
	ATTR charset attributes-charset utf-8
	ATTR language attributes-natural-language en
	ATTR uri printer-uri $uri
	ATTR integer job-id $job-id

	# What statuses are OK?
	STATUS successful-ok
	STATUS successful-ok-ignored-or-substituted-attributes

	# What attributes do we expect?
	EXPECT job-state
	EXPECT job-hold-until
}

{
	# The name of the test...
	NAME "Set job attrs with job-hold-until"

	# The resource to use for the POST
	# RESOURCE /admin

	# The operation to use
	OPERATION set-job-attributes

	# Attributes, starting in the operation group...
	GROUP operation
	ATTR charset attributes-charset utf-8
	ATTR language attributes-natural-language en
	ATTR uri printer-uri $uri
	ATTR integer job-id $job-id
	ATTR name requesting-user-name $user

	GROUP job
	ATTR name job-hold-until 00:30:00

	# What statuses are OK?
	STATUS successful-ok
	STATUS successful-ok-ignored-or-substituted-attributes
}

{
	# The name of the test...
	NAME "Get job attrs again"

	# The resource to use for the POST
	RESOURCE /

	# The operation to use
	OPERATION get-job-attributes

	# Attributes, starting in the operation group...
	GROUP operation
	ATTR charset attributes-charset utf-8
	ATTR language attributes-natural-language en
	ATTR uri printer-uri $uri
	ATTR integer job-id $job-id

	# What statuses are OK?
	STATUS successful-ok
	STATUS successful-ok-ignored-or-substituted-attributes

	# What attributes do we expect?
	EXPECT job-state
	EXPECT job-hold-until
}

{
	# The name of the test...
	NAME "Enable printer..."

	# The resource to use for the POST
	RESOURCE /admin/

	# The operation to use
	OPERATION resume-printer

	# Attributes, starting in the operation group...
	GROUP operation
	ATTR charset attributes-charset utf-8
	ATTR language attributes-natural-language en
	ATTR uri printer-uri $uri
	ATTR name requesting-user-name $user

	# What statuses are OK?
	STATUS successful-ok
	STATUS successful-ok-ignored-or-substituted-attributes
}

{
	# The name of the test...
	NAME "Get job attrs (last time)"

	# The resource to use for the POST
	RESOURCE /

	# The operation to use
	OPERATION get-job-attributes

	# Attributes, starting in the operation group...
	GROUP operation
	ATTR charset attributes-charset utf-8
	ATTR language attributes-natural-language en
	ATTR uri printer-uri $uri
	ATTR integer job-id $job-id

	# What statuses are OK?
	STATUS successful-ok
	STATUS successful-ok-ignored-or-substituted-attributes

	# What attributes do we expect?
	EXPECT job-state
	EXPECT job-hold-until
}