Skip to content

Commit

Permalink
roachtest: fix unzip command not found.
Browse files Browse the repository at this point in the history
Fixes `debug.go` roachtest that `unzip` command not found in gce.
So install `unzip` before running command.

Fixes #25152.
Release note: None
  • Loading branch information
windchan7 committed Apr 29, 2018
1 parent 78b4321 commit caed419
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion pkg/cmd/roachtest/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ func registerDebug(r *registry) {
return err
}

if err := c.RunE(ctx, c.Node(node), "sudo apt-get install unzip"); err != nil {
return err
}

if err := c.RunE(ctx, c.Node(node), "unzip "+file); err != nil {
return err
}
Expand All @@ -45,7 +49,15 @@ func registerDebug(r *registry) {
return err
}

return c.RunE(ctx, c.Node(node), "grep 'server_version' ./debug/gossip/nodes")
if err := c.RunE(ctx, c.Node(node), "grep 'server_version' ./debug/gossip/nodes"); err != nil {
return err
}

if err := c.RunE(ctx, c.Node(node), "rm -rf debug"); err != nil {
return err
}

return c.RunE(ctx, c.Node(node), "rm "+file)
}

// Wait until each nodes has at least 3 replications.
Expand Down

0 comments on commit caed419

Please sign in to comment.