From e71e6856d0a892d4bda4e7c6b0ad1463f4a65a25 Mon Sep 17 00:00:00 2001 From: Toni Spets Date: Mon, 25 Dec 2023 15:31:30 +0200 Subject: [PATCH] Re-enable SFTP integration tests (#550) --- .github/workflows/commit.yml | 65 +++++++++++++++++++++--------------- replica_client_test.go | 10 ++++-- 2 files changed, 46 insertions(+), 29 deletions(-) diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml index 04a55ff..3f7b9a4 100644 --- a/.github/workflows/commit.yml +++ b/.github/workflows/commit.yml @@ -183,34 +183,47 @@ jobs: LITESTREAM_ABS_ACCOUNT_KEY: ${{ secrets.LITESTREAM_ABS_ACCOUNT_KEY }} LITESTREAM_ABS_BUCKET: integration -## this doesn't yet work -# sftp-integration-test: -# name: Run SFTP Integration Tests -# runs-on: ubuntu-latest -# needs: build -# if: github.ref == 'refs/heads/main' -# concurrency: -# group: integration-test-sftp -# steps: -# - name: Extract SSH key -# run: 'echo "$LITESTREAM_SFTP_KEY" > /opt/id_ed25519' -# shell: bash -# env: -# LITESTREAM_SFTP_KEY: ${{secrets.LITESTREAM_SFTP_KEY}} + sftp-integration-test: + name: Run SFTP Integration Tests + runs-on: ubuntu-latest + needs: build + steps: + - name: Prepare OpenSSH server + run: |- + sudo mkdir -p /test/etc/ssh /test/home /run/sshd /test/data/ + sudo ssh-keygen -t ed25519 -f /test/etc/ssh/id_ed25519_host -N "" + sudo ssh-keygen -t ed25519 -f /test/etc/ssh/id_ed25519 -N "" + sudo chmod 0600 /test/etc/ssh/id_ed25519_host /test/etc/ssh/id_ed25519 + sudo chmod 0644 /test/etc/ssh/id_ed25519_host.pub /test/etc/ssh/id_ed25519.pub + sudo cp /test/etc/ssh/id_ed25519 /test/id_ed25519 + sudo chown $USER /test/id_ed25519 + sudo tee /test/etc/ssh/sshd_config <