diff --git a/.github/workflows/test_sftp_modules.yml b/.github/workflows/test_sftp_modules.yml index 98cdb743..2a71d0cb 100644 --- a/.github/workflows/test_sftp_modules.yml +++ b/.github/workflows/test_sftp_modules.yml @@ -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/ \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 610e6789..aab6b668 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/tests/test_wrapper_handle.py b/tests/test_wrapper_handle.py index ae4b61ca..2ff8b879 100755 --- a/tests/test_wrapper_handle.py +++ b/tests/test_wrapper_handle.py @@ -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()