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

added configurable scp put timeout. added tests #121

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

TAlonglong
Copy link
Collaborator

Added configurable scpclient_timeout_seconds attribute to the scpclient put.

@codecov
Copy link

codecov bot commented Jun 17, 2022

Codecov Report

Merging #121 (570883d) into main (499cf2f) will increase coverage by 0.17%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #121      +/-   ##
==========================================
+ Coverage   76.57%   76.74%   +0.17%     
==========================================
  Files          18       18              
  Lines        3893     3922      +29     
==========================================
+ Hits         2981     3010      +29     
  Misses        912      912              
Flag Coverage Δ
unittests 76.74% <100.00%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
trollmoves/movers.py 73.77% <100.00%> (+0.52%) ⬆️
trollmoves/tests/test_ssh_server.py 98.00% <100.00%> (+0.36%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 499cf2f...570883d. Read the comment docs.

@TAlonglong
Copy link
Collaborator Author

Not sure what the stickler issue is about. ELLIPSIS_MARKER is not used. Was it used in the past and not used anymore?

If you have time @pnuu

Copy link
Member

@pnuu pnuu left a comment

Choose a reason for hiding this comment

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

In principle LGTM, but couple of requests inline.

@@ -23,6 +23,7 @@

"""Movers for the move_it scripts."""

from doctest import ELLIPSIS_MARKER
Copy link
Member

Choose a reason for hiding this comment

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

I don't see this in main at all, so don't know where it's coming from. Should be safe to remove.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, actually, it's coming from this PR since it shows up in the diff.

@@ -178,6 +179,18 @@ def test_scp_copy(self, mock_scp_client, mock_sshclient):

mocked_scp_client.put.assert_called_once_with(self.origin, urlparse(self.destination_no_port).path)

@patch('trollmoves.movers.SSHClient', autospec=True)
@patch('trollmoves.movers.SCPClient', autospec=True)
def test_scp_copy_custom_timeout(self, mock_scp_client, mock_sshclient):
Copy link
Member

Choose a reason for hiding this comment

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

The timeout isn't tested in this test, so either adjust the name or test the timeout.

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.

Add configurable timeout to SCPClient
2 participants