Skip to content

Add suite of test cases to the sftp_{list, download, upload} plugins.#3641

Merged
paranoidi merged 5 commits intoFlexget:developfrom
kingamajick:add_sftp_tests
Dec 25, 2022
Merged

Add suite of test cases to the sftp_{list, download, upload} plugins.#3641
paranoidi merged 5 commits intoFlexget:developfrom
kingamajick:add_sftp_tests

Conversation

@kingamajick
Copy link
Copy Markdown
Contributor

@kingamajick kingamajick commented Dec 22, 2022

Motivation for changes:

Test suite missing for sftp plugins

Detailed changes:

This change uses a local test sftp server to assert the behaviour of the various sftp plugins. By using an actually test server it opens the door to moving to Paramiko if needed (see #3619) while ensuring that the current functionality doesn't break.

Note: In addition it also enables a host hey to be specified via the plugin config for the list and upload plugins. This makes it possible to use the test sftp server without adding an entry to known_hosts.

Addressed issues/feature requests:

First step towards fixing #3619

Config usage if relevant (new plugin or updated schema):

Following config added for list and upload plugins.

host_key:
    key_type: 'ssh-rsa'
    public_key: 'base64_encoded_host_key'
               

kingamajick and others added 5 commits December 22, 2022 11:00
This change uses a local test sftp server to assert the behaviour of the
various sftp plugins. By using an actually test server it opens the
door to moving to Paramiko if needed (see
#3619) while ensuring that
the current functionality doesn't break.

Note: In addition it also enables a host hey to be specified via the
plugin config for the list and upload plugins. This makes it possible
to use the test sftp server without adding an entry to known_hosts.
The previous change set corrected the key from ssh_key -> host_key
which caused the schema validation to work correctly uncovering some
errors in its configuration.
Convert dict.keys -> list
@paranoidi paranoidi merged commit afac8a5 into Flexget:develop Dec 25, 2022
@gazpachoking
Copy link
Copy Markdown
Member

Excellent, thanks!

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.

3 participants