From f617b01498e70d2357288748e99ce3a8709d7c17 Mon Sep 17 00:00:00 2001 From: Timothy Sehn Date: Tue, 9 Feb 2021 13:30:29 -0800 Subject: [PATCH 1/2] Skipped bats tests for primary key column change diff panic --- bats/schema-changes.bats | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bats/schema-changes.bats b/bats/schema-changes.bats index eb6f0d87f0..16ec777737 100755 --- a/bats/schema-changes.bats +++ b/bats/schema-changes.bats @@ -100,6 +100,16 @@ teardown() { dolt diff } +@test "dolt diff on schema changes rename primary key" { + dolt add test + dolt commit -m "committed table so we can see diffs" + dolt sql -q "alter table test rename column pk to pk1" + run dolt diff + skip "this panics right now with panic: primary key sets must be the same" + [ "$status" -eq 0 ] + [[ "$output" =~ "pk1" ]] || false +} + @test "adding and dropping column should produce no diff" { dolt add test dolt commit -m "committed table so we can see diffs" From 914cccd736817c9116899cce2b4580ec60cf8e64 Mon Sep 17 00:00:00 2001 From: Timothy Sehn Date: Tue, 9 Feb 2021 13:38:46 -0800 Subject: [PATCH 2/2] Unskip because it works in HEAD of master. Still worth the explicit test. --- bats/schema-changes.bats | 1 - 1 file changed, 1 deletion(-) diff --git a/bats/schema-changes.bats b/bats/schema-changes.bats index 16ec777737..6b1ac3856d 100755 --- a/bats/schema-changes.bats +++ b/bats/schema-changes.bats @@ -105,7 +105,6 @@ teardown() { dolt commit -m "committed table so we can see diffs" dolt sql -q "alter table test rename column pk to pk1" run dolt diff - skip "this panics right now with panic: primary key sets must be the same" [ "$status" -eq 0 ] [[ "$output" =~ "pk1" ]] || false }