Read binary data tests


Admin tests

Setup admin test case

variable defined: currentAuthToken=$divaSystemAdminAuthToken

Case 1: An admin should be able to read binary data of any visibility

Read published

Setup defines

variable defined: recordId=$publishedRecordId
variable defined: expectedDownloadAnswer=
variable defined: expectedDownloadStatus=OK
DownloadFixture
authToken recordType recordId representation testDownload? getStatusType?
$divaSystemAdminAuthToken binary $publishedRecordId master OK
$divaSystemAdminAuthToken binary $publishedRecordId thumbnail OK
$divaSystemAdminAuthToken binary $publishedRecordId medium OK
$divaSystemAdminAuthToken binary $publishedRecordId large OK
$divaSystemAdminAuthToken binary $publishedRecordId jp2 OK

Read unpublished

Setup unpublished

variable defined: recordId=$unpublishedRecordId
DownloadFixture
authToken recordType recordId representation testDownload? getStatusType?
$divaSystemAdminAuthToken binary $unpublishedRecordId master OK
$divaSystemAdminAuthToken binary $unpublishedRecordId thumbnail OK
$divaSystemAdminAuthToken binary $unpublishedRecordId medium OK
$divaSystemAdminAuthToken binary $unpublishedRecordId large OK
$divaSystemAdminAuthToken binary $unpublishedRecordId jp2 OK

Read hidden

Setup hidden

variable defined: recordId=$hiddenRecordId
DownloadFixture
authToken recordType recordId representation testDownload? getStatusType?
$divaSystemAdminAuthToken binary $hiddenRecordId master OK
$divaSystemAdminAuthToken binary $hiddenRecordId thumbnail OK
$divaSystemAdminAuthToken binary $hiddenRecordId medium OK
$divaSystemAdminAuthToken binary $hiddenRecordId large OK
$divaSystemAdminAuthToken binary $hiddenRecordId jp2 OK

Guest tests

Setup guest test case

variable defined: currentAuthToken=$guestToken

Case 1: A guest should be only able to read published binary data

Read published

Setup published

variable defined: recordId=$publishedRecordId
variable defined: expectedDownloadStatus=OK
DownloadFixture
authToken recordType recordId representation testDownload? getStatusType?
$guestToken binary $publishedRecordId master OK
$guestToken binary $publishedRecordId thumbnail OK
$guestToken binary $publishedRecordId medium OK
$guestToken binary $publishedRecordId large OK
$guestToken binary $publishedRecordId jp2 OK

Read unpublished

Setup unpublished

variable defined: recordId=$unpublishedRecordId
variable defined: expectedDownloadStatus=FORBIDDEN
DownloadFixture
authToken recordType recordId representation testDownload? getStatusType?
$guestToken binary $unpublishedRecordId master FORBIDDEN
$guestToken binary $unpublishedRecordId thumbnail FORBIDDEN
$guestToken binary $unpublishedRecordId medium FORBIDDEN
$guestToken binary $unpublishedRecordId large FORBIDDEN
$guestToken binary $unpublishedRecordId jp2 FORBIDDEN

Read hidden

Setup hidden

variable defined: recordId=$hiddenRecordId
variable defined: expectedDownloadStatus=FORBIDDEN
DownloadFixture
authToken recordType recordId representation testDownload? getStatusType?
$guestToken binary $hiddenRecordId master FORBIDDEN
$guestToken binary $hiddenRecordId thumbnail FORBIDDEN
$guestToken binary $hiddenRecordId medium FORBIDDEN
$guestToken binary $hiddenRecordId large FORBIDDEN
$guestToken binary $hiddenRecordId jp2 FORBIDDEN