-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
roachprod: adding unit test and renaming ssh.go #64156
Conversation
Thank you for contributing to CockroachDB. Please ensure you have followed the guidelines for creating a PR. My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
83f0aed
to
e9c0550
Compare
Thank you for updating your pull request. My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
e9c0550
to
01efd95
Compare
2afa351
to
2fc40fe
Compare
1357454
to
9cbae10
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r1.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @alan-mas)
9cbae10
to
48668ba
Compare
9d7378a
to
eb0beda
Compare
06a3f38
to
c0c0868
Compare
3d10254
to
8c5b9e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r4.
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @alan-mas)
pkg/cmd/roachprod/ssh/io_test.go, line 54 at r4 (raw file):
Quoted 5 lines of code…
defer func() { if err := os.Remove(output.Name()); err != nil { t.Fatal(err) } }()
Please put this right under the defer output.Close()
near the beginning of this function.
8c5b9e4
to
a8518dd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @alan-mas and @jlinder)
pkg/cmd/roachprod/ssh/io_test.go, line 25 at r5 (raw file):
t.Fatal(err) } fmt.Println(output.Name())
Why output the name of the file?
a8518dd
to
1a5efeb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @jlinder)
pkg/cmd/roachprod/ssh/io_test.go, line 54 at r4 (raw file):
Previously, jlinder (James H. Linder) wrote…
defer func() { if err := os.Remove(output.Name()); err != nil { t.Fatal(err) } }()
Please put this right under the
defer output.Close()
near the beginning of this function.
Done
pkg/cmd/roachprod/ssh/io_test.go, line 25 at r5 (raw file):
Previously, jlinder (James H. Linder) wrote…
Why output the name of the file?
Sorry for that I was printing the name to ensure the code was actually removing (so after running the test I can try to cat
to file) and forgot to removing it. Just did it now.
1a5efeb
to
19bccf2
Compare
Third part of cockroachdb#47567 where we need to refactor ssh.go (as one type structure is in use, we cannot remove it completely). So we are refactoring ssh.go and change its name to io.go and only keeping ProgressWriter struct and function Also we are adding a unit test go code to ensure it works as expected. Release note: None
19bccf2
to
4adec1d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r7.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @alan-mas)
bors r+ |
👎 Rejected by label |
bors r+ |
Build succeeded: |
Third part of #47567 and fixes #65928 where we need to refactor
ssh.go
(as one type structure is in use, we cannot remove it completely).So we are refactoring ssh.go and change its name to
io.go
and only keepingProgressWriter
struct and function.Also we are adding some unit testing for this new
go
file.Release note: None