Skip to content

Commit

Permalink
internal/integration: fixed newline for diff (#3331)
Browse files Browse the repository at this point in the history
  • Loading branch information
giautm authored Jan 20, 2025
1 parent df7bf56 commit 709e005
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/integration/script_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ func cmdCmpShow(ts *testscript.TestScript, args []string, show func(schema, name
}
var sb strings.Builder
ts.Check(diff.Text("show", fname, t1, t2, &sb))
ts.Fatalf(sb.String())
ts.Fatalf("\n%s", sb.String())
}

func (t *myTest) cmdCmpHCL(ts *testscript.TestScript, _ bool, args []string) {
Expand Down Expand Up @@ -388,7 +388,7 @@ func cmdCmpHCL(ts *testscript.TestScript, args []string, inspect func(schema str
}
var sb strings.Builder
ts.Check(diff.Text("inspect", fname, f1, f2, &sb))
ts.Fatalf(sb.String())
ts.Fatalf("\n%s", sb.String())
}

func (t *myTest) cmdExec(ts *testscript.TestScript, _ bool, args []string) {
Expand Down Expand Up @@ -503,7 +503,7 @@ func cmdCmpMig(ts *testscript.TestScript, _ bool, args []string) {
if len(exLines) != len(acLines) {
var sb strings.Builder
ts.Check(diff.Text(f.Name(), args[1], expected, actual, &sb))
ts.Fatalf(sb.String())
ts.Fatalf("\n%s", sb.String())
}
for i := range exLines {
// Skip liquibase changeset comments since they contain a timestamp.
Expand All @@ -513,7 +513,7 @@ func cmdCmpMig(ts *testscript.TestScript, _ bool, args []string) {
if exLines[i] != acLines[i] {
var sb strings.Builder
ts.Check(diff.Text(f.Name(), args[1], expected, actual, &sb))
ts.Fatalf(sb.String())
ts.Fatalf("\n%s", sb.String())
}
}
return
Expand Down

0 comments on commit 709e005

Please sign in to comment.