Skip to content

Conversation

drieseng
Copy link
Member

Add tests for SftpFileStream.Seek(...) to cover sshnet/SSH.NET#910.

@drieseng drieseng requested a review from daviburg November 28, 2022 18:37
@drieseng
Copy link
Member Author

@daviburg, some of the tests will fail because the integration tests project consumes version 2020.0.1 of SSH.NET. See sshnet/SSH.NET#1048 for a discussion (monologue rather ☹️) on this.

fs.Write(writeBuffer, 0, writeBuffer.Length);
}

using (var fs = client.OpenRead(remoteFile))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This validation code is repeated several times. Should it be moved to a parametized helper method?

Copy link
Member Author

@drieseng drieseng Nov 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to keep this as is to avoid having to navigate too much between methods in order to find out what is actually being tested.
OK?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not too fond of how verbose and repetitive the current approach is, but it is not a showstopper.

@drieseng
Copy link
Member Author

drieseng commented Nov 29, 2022

@daviburg, thanks for taking the time to review these changes. Let me know if your approval still stands after my latest commit.

@daviburg
Copy link
Collaborator

@daviburg, thanks for taking the time to review these changes. Let me know if your approval still stands after my latest commit.

Yes, I review the second commit and it looks good.

@drieseng drieseng merged commit 3f5a7d7 into main Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants