diff --git a/mbtiles/tests/copy.rs b/mbtiles/tests/copy.rs index b5d59a16b..e99125a43 100644 --- a/mbtiles/tests/copy.rs +++ b/mbtiles/tests/copy.rs @@ -257,7 +257,9 @@ async fn convert( opt.dst_type_cli = Some(dst_type); opt.zoom_levels.push(6); let z6only = dump(&mut opt.run().await?).await?; - assert_snapshot!(z6only, "v1__z6__{frm}-{to}"); + allow_duplicates! { + assert_snapshot!(z6only, "v1__z6__{to}"); + } let mut opt = copier(&frm_mbt, &mem); opt.dst_type_cli = Some(dst_type); @@ -271,7 +273,9 @@ async fn convert( opt.bbox.push(bbox.into()); let dmp = dump(&mut opt.run().await?).await?; - assert_snapshot!(dmp, "v1__bbox__{frm}-{to}"); + allow_duplicates! { + assert_snapshot!(dmp, "v1__bbox__{to}"); + } let mut opt = copier(&frm_mbt, &mem); opt.dst_type_cli = Some(dst_type); diff --git a/mbtiles/tests/snapshots/copy__convert@v1__bbox__flat-flat.snap b/mbtiles/tests/snapshots/copy__convert@v1__bbox__flat.snap similarity index 100% rename from mbtiles/tests/snapshots/copy__convert@v1__bbox__flat-flat.snap rename to mbtiles/tests/snapshots/copy__convert@v1__bbox__flat.snap diff --git a/mbtiles/tests/snapshots/copy__convert@v1__bbox__hash-flat.snap b/mbtiles/tests/snapshots/copy__convert@v1__bbox__hash-flat.snap deleted file mode 100644 index 510f57545..000000000 --- a/mbtiles/tests/snapshots/copy__convert@v1__bbox__hash-flat.snap +++ /dev/null @@ -1,42 +0,0 @@ ---- -source: mbtiles/tests/copy.rs -expression: actual_value ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "012434681F0EBF296906D6608C54D632" )', - '( "md-edit", "value - v1" )', - '( "md-remove", "value - remove" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 5, 1, 1, blob(edit-v1) )', - '( 5, 1, 2, blob() )', - '( 5, 2, 2, blob(remove) )', - '( 6, 1, 4, blob(edit-v1) )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/mbtiles/tests/snapshots/copy__convert@v1__bbox__hash-hash.snap b/mbtiles/tests/snapshots/copy__convert@v1__bbox__hash-hash.snap deleted file mode 100644 index d7da64239..000000000 --- a/mbtiles/tests/snapshots/copy__convert@v1__bbox__hash-hash.snap +++ /dev/null @@ -1,50 +0,0 @@ ---- -source: mbtiles/tests/copy.rs -expression: actual_value ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "012434681F0EBF296906D6608C54D632" )', - '( "md-edit", "value - v1" )', - '( "md-remove", "value - remove" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 5, 1, 1, blob(edit-v1), "EFE0AE5FD114DE99855BC2838BE97E1D" )', - '( 5, 1, 2, blob(), "D41D8CD98F00B204E9800998ECF8427E" )', - '( 5, 2, 2, blob(remove), "0F6969D7052DA9261E31DDB6E88C136E" )', - '( 6, 1, 4, blob(edit-v1), "EFE0AE5FD114DE99855BC2838BE97E1D" )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/mbtiles/tests/snapshots/copy__convert@v1__bbox__hash-norm.snap b/mbtiles/tests/snapshots/copy__convert@v1__bbox__hash-norm.snap deleted file mode 100644 index ae37bc9bf..000000000 --- a/mbtiles/tests/snapshots/copy__convert@v1__bbox__hash-norm.snap +++ /dev/null @@ -1,85 +0,0 @@ ---- -source: mbtiles/tests/copy.rs -expression: actual_value ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "0F6969D7052DA9261E31DDB6E88C136E", blob(remove) )', - '( "D41D8CD98F00B204E9800998ECF8427E", blob() )', - '( "EFE0AE5FD114DE99855BC2838BE97E1D", blob(edit-v1) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 5, 1, 1, "EFE0AE5FD114DE99855BC2838BE97E1D" )', - '( 5, 1, 2, "D41D8CD98F00B204E9800998ECF8427E" )', - '( 5, 2, 2, "0F6969D7052DA9261E31DDB6E88C136E" )', - '( 6, 1, 4, "EFE0AE5FD114DE99855BC2838BE97E1D" )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "012434681F0EBF296906D6608C54D632" )', - '( "md-edit", "value - v1" )', - '( "md-remove", "value - remove" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/mbtiles/tests/snapshots/copy__convert@v1__bbox__flat-hash.snap b/mbtiles/tests/snapshots/copy__convert@v1__bbox__hash.snap similarity index 100% rename from mbtiles/tests/snapshots/copy__convert@v1__bbox__flat-hash.snap rename to mbtiles/tests/snapshots/copy__convert@v1__bbox__hash.snap diff --git a/mbtiles/tests/snapshots/copy__convert@v1__bbox__norm-flat.snap b/mbtiles/tests/snapshots/copy__convert@v1__bbox__norm-flat.snap deleted file mode 100644 index 510f57545..000000000 --- a/mbtiles/tests/snapshots/copy__convert@v1__bbox__norm-flat.snap +++ /dev/null @@ -1,42 +0,0 @@ ---- -source: mbtiles/tests/copy.rs -expression: actual_value ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "012434681F0EBF296906D6608C54D632" )', - '( "md-edit", "value - v1" )', - '( "md-remove", "value - remove" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 5, 1, 1, blob(edit-v1) )', - '( 5, 1, 2, blob() )', - '( 5, 2, 2, blob(remove) )', - '( 6, 1, 4, blob(edit-v1) )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/mbtiles/tests/snapshots/copy__convert@v1__bbox__norm-hash.snap b/mbtiles/tests/snapshots/copy__convert@v1__bbox__norm-hash.snap deleted file mode 100644 index d7da64239..000000000 --- a/mbtiles/tests/snapshots/copy__convert@v1__bbox__norm-hash.snap +++ /dev/null @@ -1,50 +0,0 @@ ---- -source: mbtiles/tests/copy.rs -expression: actual_value ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "012434681F0EBF296906D6608C54D632" )', - '( "md-edit", "value - v1" )', - '( "md-remove", "value - remove" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 5, 1, 1, blob(edit-v1), "EFE0AE5FD114DE99855BC2838BE97E1D" )', - '( 5, 1, 2, blob(), "D41D8CD98F00B204E9800998ECF8427E" )', - '( 5, 2, 2, blob(remove), "0F6969D7052DA9261E31DDB6E88C136E" )', - '( 6, 1, 4, blob(edit-v1), "EFE0AE5FD114DE99855BC2838BE97E1D" )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/mbtiles/tests/snapshots/copy__convert@v1__bbox__norm-norm.snap b/mbtiles/tests/snapshots/copy__convert@v1__bbox__norm-norm.snap deleted file mode 100644 index ae37bc9bf..000000000 --- a/mbtiles/tests/snapshots/copy__convert@v1__bbox__norm-norm.snap +++ /dev/null @@ -1,85 +0,0 @@ ---- -source: mbtiles/tests/copy.rs -expression: actual_value ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "0F6969D7052DA9261E31DDB6E88C136E", blob(remove) )', - '( "D41D8CD98F00B204E9800998ECF8427E", blob() )', - '( "EFE0AE5FD114DE99855BC2838BE97E1D", blob(edit-v1) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 5, 1, 1, "EFE0AE5FD114DE99855BC2838BE97E1D" )', - '( 5, 1, 2, "D41D8CD98F00B204E9800998ECF8427E" )', - '( 5, 2, 2, "0F6969D7052DA9261E31DDB6E88C136E" )', - '( 6, 1, 4, "EFE0AE5FD114DE99855BC2838BE97E1D" )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "012434681F0EBF296906D6608C54D632" )', - '( "md-edit", "value - v1" )', - '( "md-remove", "value - remove" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/mbtiles/tests/snapshots/copy__convert@v1__bbox__flat-norm.snap b/mbtiles/tests/snapshots/copy__convert@v1__bbox__norm.snap similarity index 100% rename from mbtiles/tests/snapshots/copy__convert@v1__bbox__flat-norm.snap rename to mbtiles/tests/snapshots/copy__convert@v1__bbox__norm.snap diff --git a/mbtiles/tests/snapshots/copy__convert@v1__z6__flat-flat.snap b/mbtiles/tests/snapshots/copy__convert@v1__z6__flat.snap similarity index 100% rename from mbtiles/tests/snapshots/copy__convert@v1__z6__flat-flat.snap rename to mbtiles/tests/snapshots/copy__convert@v1__z6__flat.snap diff --git a/mbtiles/tests/snapshots/copy__convert@v1__z6__hash-flat.snap b/mbtiles/tests/snapshots/copy__convert@v1__z6__hash-flat.snap deleted file mode 100644 index 07c6751ee..000000000 --- a/mbtiles/tests/snapshots/copy__convert@v1__z6__hash-flat.snap +++ /dev/null @@ -1,42 +0,0 @@ ---- -source: mbtiles/tests/copy.rs -expression: actual_value ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "675349A4153AEC0679BE9C0637AEEBCC" )', - '( "md-edit", "value - v1" )', - '( "md-remove", "value - remove" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 6, 0, 3, blob(same) )', - '( 6, 0, 5, blob(1-keep-1-rm) )', - '( 6, 1, 4, blob(edit-v1) )', - '( 6, 2, 6, blob(1-keep-1-rm) )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/mbtiles/tests/snapshots/copy__convert@v1__z6__hash-hash.snap b/mbtiles/tests/snapshots/copy__convert@v1__z6__hash-hash.snap deleted file mode 100644 index 2c5e7f773..000000000 --- a/mbtiles/tests/snapshots/copy__convert@v1__z6__hash-hash.snap +++ /dev/null @@ -1,50 +0,0 @@ ---- -source: mbtiles/tests/copy.rs -expression: actual_value ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "675349A4153AEC0679BE9C0637AEEBCC" )', - '( "md-edit", "value - v1" )', - '( "md-remove", "value - remove" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 6, 0, 3, blob(same), "51037A4A37730F52C8732586D3AAA316" )', - '( 6, 0, 5, blob(1-keep-1-rm), "535A5575B48444EDEB926815AB26EC9B" )', - '( 6, 1, 4, blob(edit-v1), "EFE0AE5FD114DE99855BC2838BE97E1D" )', - '( 6, 2, 6, blob(1-keep-1-rm), "535A5575B48444EDEB926815AB26EC9B" )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/mbtiles/tests/snapshots/copy__convert@v1__z6__hash-norm.snap b/mbtiles/tests/snapshots/copy__convert@v1__z6__hash-norm.snap deleted file mode 100644 index 7dd593b82..000000000 --- a/mbtiles/tests/snapshots/copy__convert@v1__z6__hash-norm.snap +++ /dev/null @@ -1,85 +0,0 @@ ---- -source: mbtiles/tests/copy.rs -expression: actual_value ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "51037A4A37730F52C8732586D3AAA316", blob(same) )', - '( "535A5575B48444EDEB926815AB26EC9B", blob(1-keep-1-rm) )', - '( "EFE0AE5FD114DE99855BC2838BE97E1D", blob(edit-v1) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 6, 0, 3, "51037A4A37730F52C8732586D3AAA316" )', - '( 6, 0, 5, "535A5575B48444EDEB926815AB26EC9B" )', - '( 6, 1, 4, "EFE0AE5FD114DE99855BC2838BE97E1D" )', - '( 6, 2, 6, "535A5575B48444EDEB926815AB26EC9B" )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "675349A4153AEC0679BE9C0637AEEBCC" )', - '( "md-edit", "value - v1" )', - '( "md-remove", "value - remove" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/mbtiles/tests/snapshots/copy__convert@v1__z6__flat-hash.snap b/mbtiles/tests/snapshots/copy__convert@v1__z6__hash.snap similarity index 100% rename from mbtiles/tests/snapshots/copy__convert@v1__z6__flat-hash.snap rename to mbtiles/tests/snapshots/copy__convert@v1__z6__hash.snap diff --git a/mbtiles/tests/snapshots/copy__convert@v1__z6__norm-flat.snap b/mbtiles/tests/snapshots/copy__convert@v1__z6__norm-flat.snap deleted file mode 100644 index 07c6751ee..000000000 --- a/mbtiles/tests/snapshots/copy__convert@v1__z6__norm-flat.snap +++ /dev/null @@ -1,42 +0,0 @@ ---- -source: mbtiles/tests/copy.rs -expression: actual_value ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "675349A4153AEC0679BE9C0637AEEBCC" )', - '( "md-edit", "value - v1" )', - '( "md-remove", "value - remove" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 6, 0, 3, blob(same) )', - '( 6, 0, 5, blob(1-keep-1-rm) )', - '( 6, 1, 4, blob(edit-v1) )', - '( 6, 2, 6, blob(1-keep-1-rm) )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/mbtiles/tests/snapshots/copy__convert@v1__z6__norm-hash.snap b/mbtiles/tests/snapshots/copy__convert@v1__z6__norm-hash.snap deleted file mode 100644 index 2c5e7f773..000000000 --- a/mbtiles/tests/snapshots/copy__convert@v1__z6__norm-hash.snap +++ /dev/null @@ -1,50 +0,0 @@ ---- -source: mbtiles/tests/copy.rs -expression: actual_value ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "675349A4153AEC0679BE9C0637AEEBCC" )', - '( "md-edit", "value - v1" )', - '( "md-remove", "value - remove" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 6, 0, 3, blob(same), "51037A4A37730F52C8732586D3AAA316" )', - '( 6, 0, 5, blob(1-keep-1-rm), "535A5575B48444EDEB926815AB26EC9B" )', - '( 6, 1, 4, blob(edit-v1), "EFE0AE5FD114DE99855BC2838BE97E1D" )', - '( 6, 2, 6, blob(1-keep-1-rm), "535A5575B48444EDEB926815AB26EC9B" )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/mbtiles/tests/snapshots/copy__convert@v1__z6__norm-norm.snap b/mbtiles/tests/snapshots/copy__convert@v1__z6__norm-norm.snap deleted file mode 100644 index 7dd593b82..000000000 --- a/mbtiles/tests/snapshots/copy__convert@v1__z6__norm-norm.snap +++ /dev/null @@ -1,85 +0,0 @@ ---- -source: mbtiles/tests/copy.rs -expression: actual_value ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "51037A4A37730F52C8732586D3AAA316", blob(same) )', - '( "535A5575B48444EDEB926815AB26EC9B", blob(1-keep-1-rm) )', - '( "EFE0AE5FD114DE99855BC2838BE97E1D", blob(edit-v1) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 6, 0, 3, "51037A4A37730F52C8732586D3AAA316" )', - '( 6, 0, 5, "535A5575B48444EDEB926815AB26EC9B" )', - '( 6, 1, 4, "EFE0AE5FD114DE99855BC2838BE97E1D" )', - '( 6, 2, 6, "535A5575B48444EDEB926815AB26EC9B" )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "675349A4153AEC0679BE9C0637AEEBCC" )', - '( "md-edit", "value - v1" )', - '( "md-remove", "value - remove" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/mbtiles/tests/snapshots/copy__convert@v1__z6__flat-norm.snap b/mbtiles/tests/snapshots/copy__convert@v1__z6__norm.snap similarity index 100% rename from mbtiles/tests/snapshots/copy__convert@v1__z6__flat-norm.snap rename to mbtiles/tests/snapshots/copy__convert@v1__z6__norm.snap