Skip to content

Add tests for SftpFileStream.Seek(...) - #9

Merged
drieseng merged 2 commits into
mainfrom
seek
Nov 29, 2022
Merged

Add tests for SftpFileStream.Seek(...)#9
drieseng merged 2 commits into
mainfrom
seek

Conversation

@drieseng

Copy link
Copy Markdown
Member

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

@drieseng

Copy link
Copy Markdown
MemberAuthor

@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.

Comment threadsrc/SshNetTests/SftpTests.cs Outdated
Comment threadsrc/SshNetTests/SftpTests.cs
Comment threadsrc/SshNetTests/SftpTests.cs
Comment threadsrc/SshNetTests/SftpTests.cs Outdated
Comment threadsrc/SshNetTests/SftpTests.cs Outdated
Comment threadsrc/SshNetTests/SftpTests.cs Outdated
fs.Write(writeBuffer, 0, writeBuffer.Length);
}

using (var fs = client.OpenRead(remoteFile))

Copy link
Copy Markdown
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?

@driesengdriesengNov 29, 2022

Copy link
Copy Markdown
MemberAuthor

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
Copy Markdown
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.

Comment threadsrc/SshNetTests/SftpTests.cs Outdated
@drieseng

drieseng commented Nov 29, 2022

Copy link
Copy Markdown
MemberAuthor

@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
Copy Markdown
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 mainNov 29, 2022
Sign up for freeto 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

@drieseng@daviburg