Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: avoid special line at the end of CSV/TSV output #20835

Merged
merged 2 commits into from Feb 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion build/verify-archive.sh
Expand Up @@ -24,6 +24,5 @@ EOF
diff -u - <(cockroach sql --insecure -e 'SELECT * FROM bank.accounts') <<EOF
id balance
1 1000.50
# 1 row
EOF
cockroach quit --insecure
10 changes: 1 addition & 9 deletions pkg/acceptance/decommission_test.go
Expand Up @@ -145,6 +145,7 @@ func testDecommissionInner(
InitialBackoff: time.Second,
MaxBackoff: 5 * time.Second,
Multiplier: 1,
MaxRetries: 20,
}
for r := retry.Start(retryOpts); r.Next(); {
o, err := decommission(ctx, c, 1, idMap[0], "decommission", "--wait", "none", "--format", "csv")
Expand All @@ -155,7 +156,6 @@ func testDecommissionInner(
exp := [][]string{
decommissionHeader,
{strconv.Itoa(int(idMap[0])), "true", "0", "true", "true"},
{"# 1 row"},
decommissionFooterLive,
}
log.Infof(ctx, o)
Expand All @@ -179,7 +179,6 @@ func testDecommissionInner(
{"2"},
{"3"},
{"4"},
{"# 4 rows"},
}
if err := matchCSV(o, exp); err != nil {
t.Fatal(err)
Expand All @@ -197,7 +196,6 @@ func testDecommissionInner(
{`2`, `.*`, `.*`, `.*`, `.*`, `.*`},
{`3`, `.*`, `.*`, `.*`, `.*`, `.*`},
{`4`, `.*`, `.*`, `.*`, `.*`, `.*`},
{"# 4 rows"},
}
if err := matchCSV(o, exp); err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -230,7 +228,6 @@ func testDecommissionInner(
exp := [][]string{
decommissionHeader,
{strconv.Itoa(int(target)), "true", "0", "true", "true"},
{"# 1 row"},
decommissionFooter,
}
if err := matchCSV(o, exp); err != nil {
Expand Down Expand Up @@ -288,7 +285,6 @@ func testDecommissionInner(
exp := [][]string{
decommissionHeader,
{strconv.Itoa(int(target)), "true", "0", "true", "true"},
{"# 1 row"},
decommissionFooter,
}
if err := matchCSV(o, exp); err != nil {
Expand Down Expand Up @@ -336,7 +332,6 @@ func testDecommissionInner(
exp := [][]string{
decommissionHeader,
{strconv.Itoa(int(target)), "true", "0", "true", "true"},
{"# 1 row"},
decommissionFooter,
}
if err := matchCSV(o, exp); err != nil {
Expand Down Expand Up @@ -378,7 +373,6 @@ func testDecommissionInner(
exp := [][]string{
decommissionHeader,
{strconv.Itoa(int(target)), `true|false`, `\d+`, `true`, `true|false`},
{"# 1 row"},
decommissionFooterLive,
}
if err := matchCSV(o, exp); err != nil {
Expand All @@ -401,7 +395,6 @@ func testDecommissionInner(
{"2"},
{"3"},
{"4"},
{"# 3 rows"},
}

if err := matchCSV(o, exp); err != nil {
Expand All @@ -423,7 +416,6 @@ func testDecommissionInner(
{`2`, `.*`, `.*`, `.*`, `.*`, `.*`},
{`3`, `.*`, `.*`, `.*`, `.*`, `.*`},
{`4`, `.*`, `.*`, `.*`, `.*`, `.*`},
{"# 3 rows"},
}
if err := matchCSV(o, exp); err != nil {
time.Sleep(time.Second)
Expand Down