Skip to content

added configurable scp put timeout. added tests#121

Open
TAlonglong wants to merge 5 commits intopytroll:mainfrom
TAlonglong:issue120-scpclient-timeout-config
Open

added configurable scp put timeout. added tests#121
TAlonglong wants to merge 5 commits intopytroll:mainfrom
TAlonglong:issue120-scpclient-timeout-config

Conversation

@TAlonglong
Copy link
Collaborator

Added configurable scpclient_timeout_seconds attribute to the scpclient put.

@TAlonglong TAlonglong requested review from mraspaud and pnuu as code owners June 17, 2022 11:42
@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.


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


@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

Comments