Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: snapshots on sorted test output #1615

Merged
merged 2 commits into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions martin/tests/pg_table_source_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ fn init() {
#[actix_rt::test]
async fn table_source() {
let mock = mock_sources(mock_pgcfg("connection_string: $DATABASE_URL")).await;
insta::with_settings!({sort_maps => true}, {
assert_yaml_snapshot!(mock.0.tiles.get_catalog(), @r#"
"-function.withweired---_-characters":
content_type: application/x-protobuf
Expand Down Expand Up @@ -88,6 +89,7 @@ async fn table_source() {
content_type: application/x-protobuf
description: public.table_source_multiple_geom.geom2
"#);
});

let source = table(&mock, "table_source");
assert_yaml_snapshot!(source, @r"
Expand Down
102 changes: 51 additions & 51 deletions tests/expected/auto/catalog_auto.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
{
"fonts": {
"Overpass Mono Light": {
"end": 64258,
"family": "Overpass Mono",
"glyphs": 931,
"start": 0,
"style": "Light"
},
"Overpass Mono Regular": {
"end": 64258,
"family": "Overpass Mono",
"glyphs": 931,
"start": 0,
"style": "Regular"
}
},
"sprites": {
"src1": {
"images": [
"another_bicycle",
"bear",
"sub/circle"
]
}
},
"tiles": {
"-function.withweired---_-characters": {
"content_type": "application/x-protobuf",
Expand Down Expand Up @@ -69,28 +94,28 @@
},
"geography-class-jpg": {
"content_type": "image/jpeg",
"name": "Geography Class",
"description": "One of the example maps that comes with TileMill - a bright & colorful world map that blends retro and high-tech with its folded paper texture and interactive flag tooltips. "
"description": "One of the example maps that comes with TileMill - a bright & colorful world map that blends retro and high-tech with its folded paper texture and interactive flag tooltips. ",
"name": "Geography Class"
},
"geography-class-jpg-diff": {
"content_type": "image/jpeg",
"name": "Geography Class",
"description": "One of the example maps that comes with TileMill - a bright & colorful world map that blends retro and high-tech with its folded paper texture and interactive flag tooltips. "
"description": "One of the example maps that comes with TileMill - a bright & colorful world map that blends retro and high-tech with its folded paper texture and interactive flag tooltips. ",
"name": "Geography Class"
},
"geography-class-jpg-modified": {
"content_type": "image/jpeg",
"name": "Geography Class",
"description": "A modified version of one of the example maps that comes with TileMill - a bright & colorful world map that blends retro and high-tech with its folded paper texture and interactive flag tooltips."
"description": "A modified version of one of the example maps that comes with TileMill - a bright & colorful world map that blends retro and high-tech with its folded paper texture and interactive flag tooltips.",
"name": "Geography Class"
},
"geography-class-png": {
"content_type": "image/png",
"name": "Geography Class",
"description": "One of the example maps that comes with TileMill - a bright & colorful world map that blends retro and high-tech with its folded paper texture and interactive flag tooltips. "
"description": "One of the example maps that comes with TileMill - a bright & colorful world map that blends retro and high-tech with its folded paper texture and interactive flag tooltips. ",
"name": "Geography Class"
},
"geography-class-png-no-bounds": {
"content_type": "image/png",
"name": "Geography Class",
"description": "One of the example maps that comes with TileMill - a bright & colorful world map that blends retro and high-tech with its folded paper texture and interactive flag tooltips. "
"description": "One of the example maps that comes with TileMill - a bright & colorful world map that blends retro and high-tech with its folded paper texture and interactive flag tooltips. ",
"name": "Geography Class"
},
"json": {
"content_type": "application/json",
Expand All @@ -105,9 +130,9 @@
"description": "public.points1.geom"
},
"points1_vw": {
"attribution": "some attribution from SQL comment",
"content_type": "application/x-protobuf",
"description": "description from SQL comment",
"attribution": "some attribution from SQL comment"
"description": "description from SQL comment"
},
"points2": {
"content_type": "application/x-protobuf",
Expand Down Expand Up @@ -141,8 +166,8 @@
},
"uncompressed_mvt": {
"content_type": "application/x-protobuf",
"name": "Major cities from Natural Earth data",
"description": "Major cities from Natural Earth data"
"description": "Major cities from Natural Earth data",
"name": "Major cities from Natural Earth data"
},
"webp": {
"content_type": "image/webp",
Expand All @@ -153,53 +178,28 @@
"name": "ne2sr"
},
"world_cities": {
"content_type": "application/x-protobuf",
"content_encoding": "gzip",
"name": "Major cities from Natural Earth data",
"description": "Major cities from Natural Earth data"
"content_type": "application/x-protobuf",
"description": "Major cities from Natural Earth data",
"name": "Major cities from Natural Earth data"
},
"world_cities_diff": {
"content_type": "application/x-protobuf",
"content_encoding": "gzip",
"name": "Major cities from Natural Earth data",
"description": "Major cities from Natural Earth data"
"content_type": "application/x-protobuf",
"description": "Major cities from Natural Earth data",
"name": "Major cities from Natural Earth data"
},
"world_cities_modified": {
"content_type": "application/x-protobuf",
"content_encoding": "gzip",
"name": "Major cities from Natural Earth data",
"description": "A modified version of major cities from Natural Earth data"
"content_type": "application/x-protobuf",
"description": "A modified version of major cities from Natural Earth data",
"name": "Major cities from Natural Earth data"
},
"zoomed_world_cities": {
"content_type": "application/x-protobuf",
"content_encoding": "gzip",
"name": "Major cities from Natural Earth data",
"description": "Major cities from Natural Earth data"
}
},
"sprites": {
"src1": {
"images": [
"another_bicycle",
"bear",
"sub/circle"
]
}
},
"fonts": {
"Overpass Mono Light": {
"family": "Overpass Mono",
"style": "Light",
"glyphs": 931,
"start": 0,
"end": 64258
},
"Overpass Mono Regular": {
"family": "Overpass Mono",
"style": "Regular",
"glyphs": 931,
"start": 0,
"end": 64258
"content_type": "application/x-protobuf",
"description": "Major cities from Natural Earth data",
"name": "Major cities from Natural Earth data"
}
}
}
30 changes: 15 additions & 15 deletions tests/expected/auto/cmp.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
{
"bounds": [
-179.27313970132585,
-80.46177157848345,
179.11187181086706,
84.93092095128937
],
"description": "public.points1.geom\npublic.points2.geom",
"name": "table_source,points1,points2",
"tilejson": "3.0.0",
"tiles": [
"http://localhost:3111/table_source,points1,points2/{z}/{x}/{y}"
],
"vector_layers": [
{
"id": "table_source",
"fields": {
"gid": "int4"
}
},
"id": "table_source"
},
{
"id": "points1",
"fields": {
"gid": "int4"
}
},
"id": "points1"
},
{
"id": "points2",
"fields": {
"gid": "int4"
}
},
"id": "points2"
}
],
"bounds": [
-179.27313970132585,
-80.46177157848345,
179.11187181086706,
84.93092095128937
],
"description": "public.points1.geom\npublic.points2.geom",
"name": "table_source,points1,points2"
]
}
10 changes: 5 additions & 5 deletions tests/expected/auto/fnc.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"foo": {
"bar": "foo"
},
"name": "function_zxy_query",
"tilejson": "3.0.0",
"tiles": [
"http://localhost:3111/function_zxy_query/{z}/{x}/{y}"
],
"name": "function_zxy_query",
"foo": {
"bar": "foo"
}
]
}
6 changes: 3 additions & 3 deletions tests/expected/auto/fnc_b.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"description": "public.function_zxy_query_jsonb",
"name": "function_zxy_query_jsonb",
"tilejson": "3.0.0",
"tiles": [
"http://localhost:3111/function_zxy_query_jsonb/{z}/{x}/{y}"
],
"description": "public.function_zxy_query_jsonb",
"name": "function_zxy_query_jsonb"
]
}
10 changes: 5 additions & 5 deletions tests/expected/auto/fnc_comment.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"description": "a function source with MixedCase name",
"name": "function_Mixed_Name",
"tilejson": "3.0.0",
"tiles": [
"http://localhost:3111/function_Mixed_Name/{z}/{x}/{y}"
],
"vector_layers": [
{
"id": "MixedCase.function_Mixed_Name",
"fields": {
"Geom": "",
"TABLE": ""
}
},
"id": "MixedCase.function_Mixed_Name"
}
],
"description": "a function source with MixedCase name",
"name": "function_Mixed_Name"
]
}
6 changes: 3 additions & 3 deletions tests/expected/auto/fnc_token.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"description": "public.function_zxy_query_test",
"name": "function_zxy_query_test",
"tilejson": "3.0.0",
"tiles": [
"http://localhost:3111/function_zxy_query_test/{z}/{x}/{y}"
],
"description": "public.function_zxy_query_test",
"name": "function_zxy_query_test"
]
}
8 changes: 4 additions & 4 deletions tests/expected/auto/mb_jpg.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"tilejson": "3.0.0",
"tiles": [
"http://localhost:3111/geography-class-jpg/{z}/{x}/{y}"
],
"bounds": [
-180,
-85.0511,
Expand All @@ -15,5 +11,9 @@
"minzoom": 0,
"name": "Geography Class",
"template": "{{#__location__}}{{/__location__}}{{#__teaser__}}<div style=\"text-align:center;\">\n\n<img src=\"data:image/png;base64,{{flag_png}}\" style=\"-moz-box-shadow:0px 1px 3px #222;-webkit-box-shadow:0px 1px 5px #222;box-shadow:0px 1px 3px #222;\"><br>\n<strong>{{admin}}</strong>\n\n</div>{{/__teaser__}}{{#__full__}}{{/__full__}}",
"tilejson": "3.0.0",
"tiles": [
"http://localhost:3111/geography-class-jpg/{z}/{x}/{y}"
],
"version": "1.0.0"
}
34 changes: 17 additions & 17 deletions tests/expected/auto/mb_mvt.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
{
"tilejson": "3.0.0",
"tiles": [
"http://localhost:3111/world_cities/{z}/{x}/{y}"
],
"vector_layers": [
{
"id": "cities",
"fields": {
"name": "String"
},
"description": "",
"maxzoom": 6,
"minzoom": 0
}
],
"bounds": [
-123.12359,
-37.818085,
Expand All @@ -26,9 +11,24 @@
6
],
"description": "Major cities from Natural Earth data",
"format": "pbf",
"maxzoom": 6,
"minzoom": 0,
"name": "Major cities from Natural Earth data",
"version": "2",
"format": "pbf"
"tilejson": "3.0.0",
"tiles": [
"http://localhost:3111/world_cities/{z}/{x}/{y}"
],
"vector_layers": [
{
"description": "",
"fields": {
"name": "String"
},
"id": "cities",
"maxzoom": 6,
"minzoom": 0
}
],
"version": "2"
}
8 changes: 4 additions & 4 deletions tests/expected/auto/mb_png.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"tilejson": "3.0.0",
"tiles": [
"http://localhost:3111/geography-class-png/{z}/{x}/{y}"
],
"bounds": [
-180,
-85.0511,
Expand All @@ -20,5 +16,9 @@
"minzoom": 0,
"name": "Geography Class",
"template": "{{#__location__}}{{/__location__}}{{#__teaser__}}<div style=\"text-align:center;\">\n\n<img src=\"data:image/png;base64,{{flag_png}}\" style=\"-moz-box-shadow:0px 1px 3px #222;-webkit-box-shadow:0px 1px 5px #222;box-shadow:0px 1px 3px #222;\"><br>\n<strong>{{admin}}</strong>\n\n</div>{{/__teaser__}}{{#__full__}}{{/__full__}}",
"tilejson": "3.0.0",
"tiles": [
"http://localhost:3111/geography-class-png/{z}/{x}/{y}"
],
"version": "1.0.0"
}
10 changes: 5 additions & 5 deletions tests/expected/auto/pmt.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"tilejson": "3.0.0",
"tiles": [
"http://localhost:3111/stamen_toner__raster_CC-BY-ODbL_z3/{z}/{x}/{y}"
],
"bounds": [
-180,
-85,
Expand All @@ -15,5 +11,9 @@
0
],
"maxzoom": 3,
"minzoom": 0
"minzoom": 0,
"tilejson": "3.0.0",
"tiles": [
"http://localhost:3111/stamen_toner__raster_CC-BY-ODbL_z3/{z}/{x}/{y}"
]
}
Loading
Loading