mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-28 18:59:00 -06:00
updated compatibility tests, removed legacy compatibility tests
This commit is contained in:
@@ -1,164 +0,0 @@
|
||||
#!/usr/bin/env bats
|
||||
load $BATS_TEST_DIRNAME/helper/common.bash
|
||||
|
||||
setup() {
|
||||
setup_common
|
||||
cp -a $BATS_TEST_DIRNAME/helper/testdata/. ./
|
||||
}
|
||||
|
||||
teardown() {
|
||||
teardown_common
|
||||
}
|
||||
|
||||
@test "back-compat: data check" {
|
||||
for testdir in */; do
|
||||
cd "$testdir"
|
||||
dolt status
|
||||
run dolt migrate
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "$output" =~ "Migrating database to the latest data format" ]] || false
|
||||
run dolt branch
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "$output" =~ "master" ]] || false
|
||||
[[ "$output" =~ "conflict" ]] || false
|
||||
[[ "$output" =~ "newcolumn" ]] || false
|
||||
run dolt schema show
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "$output" =~ "\`pk\` bigint NOT NULL" ]] || false
|
||||
[[ "$output" =~ "\`a\` longtext" || "$output" =~ "\`a\` varchar(16383)" ]] || false
|
||||
[[ "$output" =~ "\`b\` datetime" ]] || false
|
||||
run dolt sql -q "select * from abc order by pk asc"
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "${lines[3]}" =~ " 1 " ]] || false
|
||||
[[ "${lines[3]}" =~ " data " ]] || false
|
||||
[[ "${lines[3]}" =~ " 2020-01-13 20:45:18.53558 " ]] || false
|
||||
dolt checkout conflict
|
||||
run dolt schema show
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "$output" =~ "\`pk\` bigint NOT NULL" ]] || false
|
||||
[[ "$output" =~ "\`a\` longtext" || "$output" =~ "\`a\` varchar(16383)" ]] || false
|
||||
[[ "$output" =~ "\`b\` datetime" ]] || false
|
||||
run dolt sql -q "select * from abc order by pk asc"
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "${lines[3]}" =~ " 1 " ]] || false
|
||||
[[ "${lines[3]}" =~ " data " ]] || false
|
||||
[[ "${lines[3]}" =~ " 2020-01-13 20:45:18.53558 " ]] || false
|
||||
[[ "${lines[4]}" =~ " 2 " ]] || false
|
||||
[[ "${lines[4]}" =~ " something " ]] || false
|
||||
[[ "${lines[4]}" =~ " 2020-01-14 20:48:37.13061 " ]] || false
|
||||
dolt checkout newcolumn
|
||||
run dolt schema show
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "$output" =~ "\`pk\` bigint NOT NULL" ]] || false
|
||||
[[ "$output" =~ "\`a\` longtext" || "$output" =~ "\`a\` varchar(16383)" ]] || false
|
||||
[[ "$output" =~ "\`b\` datetime" ]] || false
|
||||
[[ "$output" =~ "\`c\` bigint unsigned" ]] || false
|
||||
run dolt sql -q "select * from abc order by pk asc"
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "${lines[3]}" =~ " 1 " ]] || false
|
||||
[[ "${lines[3]}" =~ " data " ]] || false
|
||||
[[ "${lines[3]}" =~ " 2020-01-13 20:45:18.53558 " ]] || false
|
||||
[[ "${lines[3]}" =~ " 2133" ]] || false
|
||||
[[ "${lines[4]}" =~ " 2 " ]] || false
|
||||
[[ "${lines[4]}" =~ " something " ]] || false
|
||||
[[ "${lines[4]}" =~ " 2020-01-13 20:48:37.13061 " ]] || false
|
||||
[[ "${lines[4]}" =~ " 1132020" ]] || false
|
||||
cd ..
|
||||
done
|
||||
}
|
||||
|
||||
@test "back-compat: table operations" {
|
||||
# Broken by dropped err fixed in https://github.com/dolthub/dolt/pull/1465
|
||||
skip
|
||||
for testdir in */; do
|
||||
cd "$testdir"
|
||||
dolt table cp abc copy
|
||||
dolt table mv abc move
|
||||
run dolt ls
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "$output" =~ "copy" ]] || false
|
||||
[[ "$output" =~ "move" ]] || false
|
||||
cd ..
|
||||
done
|
||||
}
|
||||
|
||||
@test "back-compat: adding commits" {
|
||||
for testdir in */; do
|
||||
cd "$testdir"
|
||||
run dolt migrate
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "$output" =~ "Migrating database to the latest data format" ]] || false
|
||||
dolt sql -q "insert into abc values (2, 'text', '2020-01-15 20:49:22.28427')"
|
||||
dolt add .
|
||||
dolt commit -m "Add value during test"
|
||||
run dolt sql -q "select * from abc order by pk asc"
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "${lines[4]}" =~ " 2 " ]] || false
|
||||
[[ "${lines[4]}" =~ " text " ]] || false
|
||||
[[ "${lines[4]}" =~ " 2020-01-15 20:49:22.28427 " ]] || false
|
||||
dolt checkout newcolumn
|
||||
dolt checkout -b testaddcommit
|
||||
dolt sql -q "insert into abc values (3, 'text', '2020-01-15 20:49:22.28427', 9241)"
|
||||
dolt add .
|
||||
dolt commit -m "Add value during test"
|
||||
run dolt sql -q "select * from abc order by pk asc"
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "${lines[5]}" =~ " 3 " ]] || false
|
||||
[[ "${lines[5]}" =~ " text " ]] || false
|
||||
[[ "${lines[5]}" =~ " 2020-01-15 20:49:22.28427 " ]] || false
|
||||
[[ "${lines[5]}" =~ " 9241 " ]] || false
|
||||
cd ..
|
||||
done
|
||||
}
|
||||
|
||||
@test "back-compat: merging" {
|
||||
for testdir in */; do
|
||||
cd "$testdir"
|
||||
run dolt migrate
|
||||
[ "$status" -eq "0" ]
|
||||
run dolt merge newcolumn
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "$output" =~ "Fast-forward" ]] || false
|
||||
cd ..
|
||||
done
|
||||
}
|
||||
|
||||
@test "back-compat: resolving conflicts" {
|
||||
skip https://github.com/dolthub/dolt/issues/773
|
||||
for testdir in */; do
|
||||
cd "$testdir"
|
||||
run dolt migrate
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "$output" =~ "Migrating database to the latest data format" ]] || false
|
||||
dolt checkout conflict
|
||||
run dolt merge newcolumn
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "$output" =~ "CONFLICT" ]] || false
|
||||
run dolt conflicts cat abc
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "${lines[3]}" =~ " ours " ]] || false
|
||||
[[ "${lines[3]}" =~ " 2 " ]] || false
|
||||
[[ "${lines[3]}" =~ " something " ]] || false
|
||||
[[ "${lines[3]}" =~ " 2020-01-14 20:48:37.13061 " ]] || false
|
||||
[[ "${lines[3]}" =~ " NULL " ]] || false
|
||||
[[ "${lines[4]}" =~ " theirs " ]] || false
|
||||
[[ "${lines[4]}" =~ " 2 " ]] || false
|
||||
[[ "${lines[4]}" =~ " something " ]] || false
|
||||
[[ "${lines[4]}" =~ " 2020-01-13 20:48:37.13061 " ]] || false
|
||||
[[ "${lines[4]}" =~ " 1132020 " ]] || false
|
||||
dolt conflicts resolve --theirs abc
|
||||
dolt add .
|
||||
dolt commit -m "Merged newcolumn into conflict"
|
||||
run dolt sql -q "select * from abc order by pk asc"
|
||||
[ "$status" -eq "0" ]
|
||||
[[ "${lines[3]}" =~ " 1 " ]] || false
|
||||
[[ "${lines[3]}" =~ " data " ]] || false
|
||||
[[ "${lines[3]}" =~ " 2020-01-13 20:45:18.53558 " ]] || false
|
||||
[[ "${lines[3]}" =~ " 2133" ]] || false
|
||||
[[ "${lines[4]}" =~ " 2 " ]] || false
|
||||
[[ "${lines[4]}" =~ " something " ]] || false
|
||||
[[ "${lines[4]}" =~ " 2020-01-13 20:48:37.13061 " ]] || false
|
||||
[[ "${lines[4]}" =~ " 1132020" ]] || false
|
||||
cd ..
|
||||
done
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
|
||||
4:__LD_1__:kgbtojhb52j8ni3hfrdnbntd2um8aetv:j88k1vjjvval95ejvp6ooq0vefc68h5c:m3sn7rmfc0lbis3codosl1k46hpv0kod:3:ml7hl70ar993tc32gla4ttjar0ogka86:1:5im08tb1mu140r7kvtrd04u8ub5qk607:4:ie2tcnurro57vl8urvucbjdrmmf9bo0h:1:9guvpb6l55h1t9aqaa9b7qnp1dnnelkd:1:k3ksuke2vcb2hgatpdqbhildb8raab5p:1:89knkh4sejb7tf05gqq01osftlbsmdq1:5:glc2mu652o0pt893a79j30tc6kgvk453:1:eiit9a47igil0id02vhgpq4g72ga3dha:1:jji5lv8nq265dpk6r11ug3gb6ih81hdr:1:c8dirve58o6npl3aufbupn3c2pt55el4:4:6oc2i2n9ln25n8go78dalvo3e9er9mg3:1:fkes7bk2bl0p9cvfgk3dd7uf6p4cqcm1:1:ojdo9hafo3mvlko0cefqcom7os26utln:1:c8a3b64elue3121ng0rgeagcnf48fbat:1:iellg8am40vu2tf61hbe7i0anhm76gtv:2:ju51cbttj99itbsbk2svu7sij2tu4rhl:4:9ibrf56gr6gsgr7cpnda4au9o0vd0412:2:srlc19tj78ldn4hbb8duso90i1vugc59:1:s69lvejsvg9so3l2nsquavmbai4dmu03:4:7er6962c841ghn8j0a357ujde9daq3mu:2:og4gt15c913id9e4iv7bcobjkn6aqn8d:1:7vu480853r3b0hitt89l7gc3r854fb53:1:rcksm0pvt2fop4deb2tf881mo0vj4ih8:1:0kl39j0i7gljemj93loojdhdbsj9lb36:1:u62g6ma6evirqjb11i0up0p1hppb50ou:1:4bujnjuatdli0klda7ucot0tl836jujt:1:m297l94np7ub1bp8irhpf3eta6bpegr8:4:rrbqpqt3l59s17rbva7pjrqhitbe4cc2:1:6739m2utlhl1k98f4o2fqmgtm12ino4t:1:di7sdosugcarnn353e8ldbnlts9v42s5:1:09hv7tllti9b3hfi7u5m3e7lpbne390a:1:qqc5268agbqc0nqdud6gn7m202teffnm:4:g2slg3mhtfb5m2tk00t8mor5lkboqj2m:1:ug6l7o53ntp50f252u65cj96om411v14:4:ca9rtjbjd7n5pkodo3rsl6bon0s8qe4j:1:q5eq2e7gn1osgqg6bdqctgi7o7lapsik:1:tmie2h7f80pblg0ojfk0v50qu8s97mpa:4:frc0ef452fhh97o534e7lol2b427lk56:1:es7vlqed0665gq9es3ns2uqeh75bkerc:4:os1po1dclurjkflegl02usl2r8rkg2cq:1:1rnurg4no9s6s23mdq8vvfmj0cik47db:1:oarahke38ufh3tmnfpafuvb51dfbhgmh:2:a9307merr53dd71vj459m7qo6rk435na:1:ag7kv5tuc4jvovmas7r5kel32dd94g86:1:csopsqdj2urggh85gbsfth4c9lf4r8vb:1:3dsltc9vis2m6o89bv0dh482pfme30ss:1:1nrr0bod1960bccqc6c2med68hod5gc7:2:miv7sdaoglrgfs2rgafm77kr6h9cbgvn:1:hgsmoadjsib12ml6e05or4q5urv9lt7l:4:a8hqijvam2c6r9qvbffsdj5r55bis0mn:2:naromh9oel8c6dmmg6lvg61ot3gvomkv:1:kmjfnt24t2vf8e58u3r5insr7tfohm2e:1
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"head": "refs/heads/master",
|
||||
"staged": "hlgmnafjvlg8curcjc14dok7k1h3mqci",
|
||||
"working": "hlgmnafjvlg8curcjc14dok7k1h3mqci",
|
||||
"merge": null,
|
||||
"remotes": null,
|
||||
"branches": null
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
## Overview
|
||||
|
||||
This is test data that captures a repository on January 13, 2020. This may be used to verify that any serialization/deserialization changes are compatible with people's pre-existing data.
|
||||
|
||||
# Branch master
|
||||
|
||||
## Schema
|
||||
|
||||
```
|
||||
CREATE TABLE `abc` (
|
||||
`pk` BIGINT NOT NULL COMMENT 'tag:0',
|
||||
`a` LONGTEXT COMMENT 'tag:694',
|
||||
`b` DATETIME COMMENT 'tag:2902',
|
||||
PRIMARY KEY (`pk`)
|
||||
);
|
||||
```
|
||||
|
||||
## Data
|
||||
|
||||
```
|
||||
+----+------+---------------------------+
|
||||
| pk | a | b |
|
||||
+----+------+---------------------------+
|
||||
| 1 | data | 2020-01-13 20:45:18.53558 |
|
||||
+----+------+---------------------------+
|
||||
```
|
||||
|
||||
# Branch conflict
|
||||
|
||||
## Schema
|
||||
|
||||
```
|
||||
CREATE TABLE `abc` (
|
||||
`pk` BIGINT NOT NULL COMMENT 'tag:0',
|
||||
`a` LONGTEXT COMMENT 'tag:694',
|
||||
`b` DATETIME COMMENT 'tag:2902',
|
||||
PRIMARY KEY (`pk`)
|
||||
);
|
||||
```
|
||||
|
||||
## Data
|
||||
|
||||
```
|
||||
+----+-----------+---------------------------+
|
||||
| pk | a | b |
|
||||
+----+-----------+---------------------------+
|
||||
| 1 | data | 2020-01-13 20:45:18.53558 |
|
||||
| 2 | something | 2020-01-14 20:48:37.13061 |
|
||||
+----+-----------+---------------------------+
|
||||
```
|
||||
|
||||
# Branch newcolumn
|
||||
|
||||
## Schema
|
||||
|
||||
```
|
||||
CREATE TABLE `abc` (
|
||||
`pk` BIGINT NOT NULL COMMENT 'tag:0',
|
||||
`a` LONGTEXT COMMENT 'tag:694',
|
||||
`b` DATETIME COMMENT 'tag:2902',
|
||||
`c` BIGINT UNSIGNED COMMENT 'tag:4657',
|
||||
PRIMARY KEY (`pk`)
|
||||
);
|
||||
```
|
||||
|
||||
## Data
|
||||
|
||||
```
|
||||
+----+-----------+---------------------------+---------+
|
||||
| pk | a | b | c |
|
||||
+----+-----------+---------------------------+---------+
|
||||
| 1 | data | 2020-01-13 20:45:18.53558 | 2133 |
|
||||
| 2 | something | 2020-01-13 20:48:37.13061 | 1132020 |
|
||||
+----+-----------+---------------------------+---------+
|
||||
```
|
||||
@@ -1 +0,0 @@
|
||||
{}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
|
||||
4:__LD_1__:c8vc329o1pc5bjh36rl7qk0jeuoj21ul:ugdi9lf0i1ej2ddddntu4gt148m7m1ft:fi3vd71upeqgs7ffmc198536l2ah2nem:1:9657m1fpeclidkpn8g2h38594pht9jsq:1:3f7h9ho7l4ltmil4ip6iv5csfjeqa8pe:1:h463bia4dpvciqkm76vfj5qr4ed0l6k1:1:7a407hfrv6mucer355itqg34lsui05ln:2:fjfk34olm8dg9f3l7u7sqk259allkpbq:1:g1k00sceog5vkmf454dpcf5prg458vrh:1:94tvddc0h23hi71m0ovp3emkdv8ko6uq:1:a4ofkmekn2f0ih23dmqg9klvhr7caje8:1:psdvh71n9e069pl01nkcg5aijos7k891:2:8q7v5097qicfnloaqc6roe05ef75428s:4:p3u6rb5hpkc8dcqfvlq3ptr2a0rsodu2:4:3skhauhatndqile2e7mqs6q25eoh4988:2:gi9e8nmhav58f4vukca2vc2cd87u09af:1:6bc0ms2gnjcepoup7ni9110khaljmu47:1:jff26llmtmj7ap2rtlc4g7v42bfmg8a7:4:cvk1s81mdeof0rnedr8vmk4f3qh91r2a:4:4ae47cm21t7cuq7vluh2ugosmv3djfii:1:cae69p9bv9qgk8gnmcetcrq6pb337bur:1:77goep5rp0nmldp0pn8j66ria281d7tv:1:01mcg27ngkhkrthdo0p1ogdti510ui2d:1:lci84t6s7j5r171qn02dlr7aqns6549e:1:n49314e2mcvrf6fi2g6s1s3dkv87e4i0:4:g3n9nvmfponntake5r368lnlljmbidke:1:0t9600cdhn6hoshofgps1e1qeipsj8dt:1:sfa54kk9itpahbnapbf56d6vue2b6iko:1:0t63hbmjg0o2e0l2muvmpdt7clu931h9:1:9hrkb1viqhe9iplh2b623i4g358tcn16:4:refbbl8digdrdb0mhrfk6a0mkuhb0ran:2:3oobbccq8prr93u72rui774p5bddobss:1:t9virrnc5olckgn23ok6cnak68ld8a29:5:fvv6ab1mar3engqa8aunlous38m1pbtd:1:vcgoj8o1malsol4avn930tpngsd4094u:1:u025c384nohd013tjaeq6c1vn6cj1v9r:2:rd6kqkaclph8l93js1f2h00pna5uuqif:1:4bujnjuatdli0klda7ucot0tl836jujt:1:jqt5s1qs2g998ugg538u8l7c706it2cb:4:8gnmhsv44p0qfgi21hvq6ql0hvv4r7tr:1:h16g5dvp5vkq837snpa8760ac8lhl4ad:1:vfm8fpknt3arl9rn73mh1nn0sk46olmo:2
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user