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

Test SFTP Login by Updating Port Assignment in wrapper_manager #426

Merged
merged 3 commits into from
Mar 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/test_sftp_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,37 @@ jobs:
TEST_PORT: ${{ secrets.TEST_PORT }}
OUTPUT_LOCATION: ${{ github.workspace }}/tests/

test_wrapper:
runs-on: ubuntu-latest
needs: test_download
if: github.repository_owner == 'BU-ISCIII'
strategy:
max-parallel: 1
matrix:
download_options: ["download_only", "download_clean"]

steps:
- name: Set up Python 3.9.16
uses: actions/setup-python@v3
with:
python-version: '3.9.16'

- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Install package and dependencies
run: |
pip install -r requirements.txt
pip install .

- name: Run Wrapper tests
run: |
python3 tests/test_wrapper_handle.py --download_option ${{ matrix.download_options }}
env:
TEST_USER: ${{ secrets.TEST_USER }}
TEST_PASSWORD: ${{ secrets.TEST_PASSWORD }}
TEST_PORT: ${{ secrets.TEST_PORT }}
OUTPUT_LOCATION: ${{ github.workspace }}/tests/
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Code contributions to the release:
- Add wrapper to github actions (test_sftp_modules) [#409](https://github.com/BU-ISCIII/relecov-tools/pull/409)
- Remove wrapper from github actions (test_sftp_modules) [#421](https://github.com/BU-ISCIII/relecov-tools/pull/421)
- Add Validation for Dropdown Columns: Notify Users of Invalid Entries in build-schema module [#423](https://github.com/BU-ISCIII/relecov-tools/pull/423)
- Test SFTP Login by Updating Port Assignment in wrapper_manager [#426](https://github.com/BU-ISCIII/relecov-tools/pull/426)

#### Fixes

Expand Down
2 changes: 1 addition & 1 deletion tests/test_wrapper_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def prepare_remote_test(**kwargs):
"target_folders": kwargs["target_folders"],
}

download_manager.relecov_sftp.sftp_port = os.environ["TEST_PORT"]
wrapper_manager.download_manager.relecov_sftp.sftp_port = os.environ["TEST_PORT"]

def test_wrapper(wrapper_manager):
wrapper_manager.run_wrapper()
Expand Down
Loading