diff options
Diffstat (limited to 'render-test/tests')
-rw-r--r-- | render-test/tests/network/fail-requests-transferred/expected.png | bin | 0 -> 17383 bytes | |||
-rw-r--r-- | render-test/tests/network/fail-requests-transferred/metrics.json | 14 | ||||
-rw-r--r-- | render-test/tests/network/fail-requests-transferred/style.json | 67 | ||||
-rw-r--r-- | render-test/tests/network/fail-requests/expected.png | bin | 0 -> 17383 bytes | |||
-rw-r--r-- | render-test/tests/network/fail-requests/metrics.json | 14 | ||||
-rw-r--r-- | render-test/tests/network/fail-requests/style.json | 67 | ||||
-rw-r--r-- | render-test/tests/network/fail-transferred/expected.png | bin | 0 -> 17383 bytes | |||
-rw-r--r-- | render-test/tests/network/fail-transferred/metrics.json | 14 | ||||
-rw-r--r-- | render-test/tests/network/fail-transferred/style.json | 67 | ||||
-rw-r--r-- | render-test/tests/network/pass/expected.png | bin | 0 -> 17383 bytes | |||
-rw-r--r-- | render-test/tests/network/pass/metrics.json | 14 | ||||
-rw-r--r-- | render-test/tests/network/pass/style.json | 67 | ||||
-rw-r--r-- | render-test/tests/should-fail.json | 5 |
13 files changed, 328 insertions, 1 deletions
diff --git a/render-test/tests/network/fail-requests-transferred/expected.png b/render-test/tests/network/fail-requests-transferred/expected.png Binary files differnew file mode 100644 index 0000000000..b63b151765 --- /dev/null +++ b/render-test/tests/network/fail-requests-transferred/expected.png diff --git a/render-test/tests/network/fail-requests-transferred/metrics.json b/render-test/tests/network/fail-requests-transferred/metrics.json new file mode 100644 index 0000000000..1a200ca38f --- /dev/null +++ b/render-test/tests/network/fail-requests-transferred/metrics.json @@ -0,0 +1,14 @@ +{ + "network": [ + [ + "end", + 2, + 200000 + ], + [ + "start", + 0, + 0 + ] + ] +}
\ No newline at end of file diff --git a/render-test/tests/network/fail-requests-transferred/style.json b/render-test/tests/network/fail-requests-transferred/style.json new file mode 100644 index 0000000000..ef94ddc748 --- /dev/null +++ b/render-test/tests/network/fail-requests-transferred/style.json @@ -0,0 +1,67 @@ +{ + "version": 8, + "metadata": { + "test": { + "operations": [ + ["probeNetworkStart"], + ["probeNetwork", "start"], + ["wait"], + ["probeNetwork", "end"], + ["probeNetworkEnd"] + ], + "height": 256, + "width": 1024 + } + }, + "center": [ + -73, + 15 + ], + "zoom": 4.5, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/mapbox.mapbox-streets-v7/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line-center", + "type": "symbol", + "source": "mapbox", + "source-layer": "marine_label", + "layout": { + "text-field": "{name_en}", + "symbol-placement": "line-center", + "text-allow-overlap": true, + "text-size": 35, + "text-letter-spacing": 0.4, + "text-offset": [3, 0], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "line", + "type": "line", + "source": "mapbox", + "source-layer": "marine_label", + "paint": { + "line-width": 1 + } + } + ] +} diff --git a/render-test/tests/network/fail-requests/expected.png b/render-test/tests/network/fail-requests/expected.png Binary files differnew file mode 100644 index 0000000000..b63b151765 --- /dev/null +++ b/render-test/tests/network/fail-requests/expected.png diff --git a/render-test/tests/network/fail-requests/metrics.json b/render-test/tests/network/fail-requests/metrics.json new file mode 100644 index 0000000000..81c9b8a5d4 --- /dev/null +++ b/render-test/tests/network/fail-requests/metrics.json @@ -0,0 +1,14 @@ +{ + "network": [ + [ + "end", + 2, + 183111 + ], + [ + "start", + 0, + 0 + ] + ] +}
\ No newline at end of file diff --git a/render-test/tests/network/fail-requests/style.json b/render-test/tests/network/fail-requests/style.json new file mode 100644 index 0000000000..ef94ddc748 --- /dev/null +++ b/render-test/tests/network/fail-requests/style.json @@ -0,0 +1,67 @@ +{ + "version": 8, + "metadata": { + "test": { + "operations": [ + ["probeNetworkStart"], + ["probeNetwork", "start"], + ["wait"], + ["probeNetwork", "end"], + ["probeNetworkEnd"] + ], + "height": 256, + "width": 1024 + } + }, + "center": [ + -73, + 15 + ], + "zoom": 4.5, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/mapbox.mapbox-streets-v7/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line-center", + "type": "symbol", + "source": "mapbox", + "source-layer": "marine_label", + "layout": { + "text-field": "{name_en}", + "symbol-placement": "line-center", + "text-allow-overlap": true, + "text-size": 35, + "text-letter-spacing": 0.4, + "text-offset": [3, 0], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "line", + "type": "line", + "source": "mapbox", + "source-layer": "marine_label", + "paint": { + "line-width": 1 + } + } + ] +} diff --git a/render-test/tests/network/fail-transferred/expected.png b/render-test/tests/network/fail-transferred/expected.png Binary files differnew file mode 100644 index 0000000000..b63b151765 --- /dev/null +++ b/render-test/tests/network/fail-transferred/expected.png diff --git a/render-test/tests/network/fail-transferred/metrics.json b/render-test/tests/network/fail-transferred/metrics.json new file mode 100644 index 0000000000..20b42d5b9b --- /dev/null +++ b/render-test/tests/network/fail-transferred/metrics.json @@ -0,0 +1,14 @@ +{ + "network": [ + [ + "end", + 3, + 100000 + ], + [ + "start", + 0, + 0 + ] + ] +}
\ No newline at end of file diff --git a/render-test/tests/network/fail-transferred/style.json b/render-test/tests/network/fail-transferred/style.json new file mode 100644 index 0000000000..ef94ddc748 --- /dev/null +++ b/render-test/tests/network/fail-transferred/style.json @@ -0,0 +1,67 @@ +{ + "version": 8, + "metadata": { + "test": { + "operations": [ + ["probeNetworkStart"], + ["probeNetwork", "start"], + ["wait"], + ["probeNetwork", "end"], + ["probeNetworkEnd"] + ], + "height": 256, + "width": 1024 + } + }, + "center": [ + -73, + 15 + ], + "zoom": 4.5, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/mapbox.mapbox-streets-v7/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line-center", + "type": "symbol", + "source": "mapbox", + "source-layer": "marine_label", + "layout": { + "text-field": "{name_en}", + "symbol-placement": "line-center", + "text-allow-overlap": true, + "text-size": 35, + "text-letter-spacing": 0.4, + "text-offset": [3, 0], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "line", + "type": "line", + "source": "mapbox", + "source-layer": "marine_label", + "paint": { + "line-width": 1 + } + } + ] +} diff --git a/render-test/tests/network/pass/expected.png b/render-test/tests/network/pass/expected.png Binary files differnew file mode 100644 index 0000000000..b63b151765 --- /dev/null +++ b/render-test/tests/network/pass/expected.png diff --git a/render-test/tests/network/pass/metrics.json b/render-test/tests/network/pass/metrics.json new file mode 100644 index 0000000000..6afd106a45 --- /dev/null +++ b/render-test/tests/network/pass/metrics.json @@ -0,0 +1,14 @@ +{ + "network": [ + [ + "end", + 3, + 183111 + ], + [ + "start", + 0, + 0 + ] + ] +}
\ No newline at end of file diff --git a/render-test/tests/network/pass/style.json b/render-test/tests/network/pass/style.json new file mode 100644 index 0000000000..ef94ddc748 --- /dev/null +++ b/render-test/tests/network/pass/style.json @@ -0,0 +1,67 @@ +{ + "version": 8, + "metadata": { + "test": { + "operations": [ + ["probeNetworkStart"], + ["probeNetwork", "start"], + ["wait"], + ["probeNetwork", "end"], + ["probeNetworkEnd"] + ], + "height": 256, + "width": 1024 + } + }, + "center": [ + -73, + 15 + ], + "zoom": 4.5, + "sources": { + "mapbox": { + "type": "vector", + "maxzoom": 14, + "tiles": [ + "local://tiles/mapbox.mapbox-streets-v7/{z}-{x}-{y}.mvt" + ] + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "line-center", + "type": "symbol", + "source": "mapbox", + "source-layer": "marine_label", + "layout": { + "text-field": "{name_en}", + "symbol-placement": "line-center", + "text-allow-overlap": true, + "text-size": 35, + "text-letter-spacing": 0.4, + "text-offset": [3, 0], + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + }, + { + "id": "line", + "type": "line", + "source": "mapbox", + "source-layer": "marine_label", + "paint": { + "line-width": 1 + } + } + ] +} diff --git a/render-test/tests/should-fail.json b/render-test/tests/should-fail.json index 30c91836a7..d80b419605 100644 --- a/render-test/tests/should-fail.json +++ b/render-test/tests/should-fail.json @@ -2,5 +2,8 @@ "tests/file-size/fail-size-is-over": "Should fail, size is bigger than expected.", "tests/file-size/fail-size-is-under": "Should fail, size is smaller than expected.", "tests/file-size/fail-file-doesnt-match": "Should fail, doesn't match the expectation.", - "tests/file-size/fail-file-not-found": "Should fail, file not found." + "tests/file-size/fail-file-not-found": "Should fail, file not found.", + "tests/network/fail-requests": "Should fail, number of requests higher than expected.", + "tests/network/fail-transferred": "Should fail, amount of transferred data higher than expected.", + "tests/network/fail-requests-transferred": "Should fail, number of requests higher than expected and amount of transferred data less than expected." } |