Skip to content

Commit

Permalink
new line at end of output
Browse files Browse the repository at this point in the history
  • Loading branch information
SamMcEachern committed Mar 7, 2024
1 parent a2915a8 commit ce2fdf7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/spanner/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ func (i MigrationsOutput) String() string {
output = fmt.Sprintf("%s\n%s - rows affected: %d", output, filename, migrationInfo.RowsAffected)
}

return output
return fmt.Sprintf("%s\n", output)
}

func (c *Client) ExecuteMigrations(ctx context.Context, migrations Migrations, limit int, tableName string) (MigrationsOutput, error) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/spanner/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ func Test_MigrationInfoString(t *testing.T) {
RowsAffected: 2000,
},
},
exptectedOutput: "Migration Information:\ni-deleted-everything.sql - rows affected: 2000",
exptectedOutput: "Migration Information:\ni-deleted-everything.sql - rows affected: 2000\n",
},
{
testName: "many result",
Expand All @@ -815,7 +815,7 @@ func Test_MigrationInfoString(t *testing.T) {
RowsAffected: 2000,
},
},
exptectedOutput: "Migration Information:\ni-am-a-cool-update.sql - rows affected: 20\nnot-as-cool-as-me.sql - rows affected: 25\ni-deleted-everything.sql - rows affected: 2000",
exptectedOutput: "Migration Information:\ni-am-a-cool-update.sql - rows affected: 20\nnot-as-cool-as-me.sql - rows affected: 25\ni-deleted-everything.sql - rows affected: 2000\n",
},
}

Expand Down

0 comments on commit ce2fdf7

Please sign in to comment.