Skip to content

Commit b74785f

Browse files
committed
Update tests for iipsrv 1.3
1 parent d83d040 commit b74785f

4 files changed

Lines changed: 41 additions & 28 deletions

File tree

README.md

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# iipsrv
22

33
A single-container deployment of [IIPImage](https://iipimage.sourceforge.io),
4-
running on [nginx](http://nginx.org/en/) with FastCGI.
5-
6-
(Forked from [iiip-nginx-single](https://git.lib.berkeley.edu/lap/iiip-nginx-single).)
4+
running on lighttpd. This is based on the upstream `iipsrv/iipsrv`
5+
base image, except with updated packages.
76

87
## Configuration
98

@@ -41,7 +40,7 @@ Note that nginx/IIPImage runs on port 80, and is exposed on host port 80.
4140
By default, the [`iipsrv-entrypoint.sh`](iipsrv-entrypoint.sh) script will
4241
cause files to be served from the `test/data` directory.
4342

44-
You can override this mount by passing a `$FILESYSTEM` value to
43+
You can override this mount by passing a `$FILESYSTEM_PREFIX` value to
4544
the container; see below under ["Custom configuration"](#custom-configuration).
4645

4746
#### Testing
@@ -53,13 +52,12 @@ To test that the container has come up correctly, using the image file
5352
curl -v 'http://localhost/iiif/test.tif/info.json'
5453
```
5554

56-
This should produce a IIIF [information response](https://iiif.io/api/image/2.0/#information-request)
55+
This should produce a IIIF [information response](https://iiif.io/api/image/3.0/#51-image-information-request)
5756
in JSON format, e.g.:
5857

5958
```json
6059
{
61-
"@context" : "http://iiif.io/api/image/2/context.json",
62-
"@id" : "http://localhost/iiif/test.tif",
60+
"@context" : "http://iiif.io/api/image/3/context.json",
6361
"protocol" : "http://iiif.io/api/image",
6462
"width" : 2769,
6563
"height" : 3855,
@@ -72,15 +70,23 @@ in JSON format, e.g.:
7270
"tiles" : [
7371
{ "width" : 256, "height" : 256, "scaleFactors" : [ 1, 2, 4, 8, 16 ] }
7472
],
75-
"profile" : [
76-
"http://iiif.io/api/image/2/level1.json",
77-
{ "formats" : [ "jpg" ],
78-
"qualities" : [ "native","color","gray","bitonal" ],
79-
"supports" : ["regionByPct","regionSquare","sizeByForcedWh","sizeByWh","sizeAboveFull","rotationBy90s","mirroring"],
80-
"maxWidth" : 5000,
81-
"maxHeight" : 5000
82-
}
73+
"id" : "http://localhost/iiif/test.tif",
74+
"type": "ImageService3",
75+
"profile" : "level2",
76+
"maxWidth" : 5000,
77+
"maxHeight" : 5000,
78+
"extraQualities": ["color","gray","bitonal"],
79+
"extraFormats": ["tif","webp","avif"],
80+
"extraFeatures": ["regionByPct","sizeByPct","sizeByConfinedWh","sizeUpscaling","rotationBy90s","mirroring"],
81+
"service": [
82+
{
83+
"@context": "http://iiif.io/api/annex/services/physdim/1/context.json",
84+
"profile": "http://iiif.io/api/annex/services/physdim",
85+
"physicalScale": 0.00846667,
86+
"physicalUnits": "cm"
87+
}
8388
]
89+
8490
}
8591
```
8692

test/default.jpg

-11 Bytes
Loading

test/info.json

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"@context" : "http://iiif.io/api/image/2/context.json",
3-
"@id" : "http://localhost/iiif/test.tif",
2+
"@context" : "http://iiif.io/api/image/3/context.json",
43
"protocol" : "http://iiif.io/api/image",
54
"width" : 2769,
65
"height" : 3855,
@@ -13,13 +12,21 @@
1312
"tiles" : [
1413
{ "width" : 256, "height" : 256, "scaleFactors" : [ 1, 2, 4, 8, 16 ] }
1514
],
16-
"profile" : [
17-
"http://iiif.io/api/image/2/level1.json",
18-
{ "formats" : [ "jpg" ],
19-
"qualities" : [ "native","color","gray","bitonal" ],
20-
"supports" : ["regionByPct","regionSquare","sizeByForcedWh","sizeByWh","sizeAboveFull","rotationBy90s","mirroring"],
21-
"maxWidth" : 5000,
22-
"maxHeight" : 5000
23-
}
15+
"id" : "http://localhost/iiif/test.tif",
16+
"type": "ImageService3",
17+
"profile" : "level1",
18+
"maxWidth" : 5000,
19+
"maxHeight" : 5000,
20+
"extraQualities": ["color","gray","bitonal"],
21+
"extraFormats": ["tif","webp"],
22+
"extraFeatures": ["regionByPct","sizeByPct","sizeByConfinedWh","sizeUpscaling","rotationBy90s","mirroring"],
23+
"service": [
24+
{
25+
"@context": "http://iiif.io/api/annex/services/physdim/1/context.json",
26+
"profile": "http://iiif.io/api/annex/services/physdim",
27+
"physicalScale": 0.00846667,
28+
"physicalUnits": "cm"
29+
}
2430
]
31+
2532
}

test/test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/bin/sh
22

33
############################################################
44
# Helper functions
@@ -26,13 +26,13 @@ assert_identical() {
2626
echo "${actual_file} did not match expected ${expected_file}"
2727

2828
local expected_md5=$(md5sum "${expected_file}")
29-
local expected_size=$(wc -c "${expected_file}" | /usr/bin/grep -Eo '[[:digit:]]+')
29+
local expected_size=$(wc -c "${expected_file}" | grep -Eo '[[:digit:]]+')
3030

3131
echo "Expected: ${expected_md5}"
3232
echo " ${expected_size} bytes"
3333

3434
local actual_md5=$(md5sum "${actual_file}")
35-
local actual_size=$(wc -c "${actual_file}" | /usr/bin/grep -Eo '[[:digit:]]+')
35+
local actual_size=$(wc -c "${actual_file}" | grep -Eo '[[:digit:]]+')
3636

3737
echo "Actual: ${actual_md5}"
3838
echo " ${actual_size} bytes"

0 commit comments

Comments
 (0)