Skip to content

Commit

Permalink
Add integration test for map-eav
Browse files Browse the repository at this point in the history
  • Loading branch information
mpchadwick committed Nov 11, 2020
1 parent 3ee818c commit 932d557
Show file tree
Hide file tree
Showing 2 changed files with 119 additions and 0 deletions.
12 changes: 12 additions & 0 deletions integration/dbanon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,16 @@ func TestDbanon(t *testing.T) {
if strings.Contains(res3, "customer2LastName") {
t.Error("Expected no customer2LastName")
}

cmdStr4 := "cat integration/magento_eav_before.sql | ./dbanon -config=magento2 map-eav"
cmd4 := exec.Command("bash", "-c", cmdStr4)
out4, _ := cmd4.CombinedOutput()
res4 := strings.TrimSpace(string(out4))
if !strings.Contains(res4, "\"5\": firstname") {
t.Errorf("First name not processed correctly")
}

if !strings.Contains(res4, "\"28\": street") {
t.Errorf("Street not processed correctly")
}
}
Loading

0 comments on commit 932d557

Please sign in to comment.