From bc22fb2bf2d520c96350d09348b388c107085770 Mon Sep 17 00:00:00 2001 From: Reactor Scram Date: Thu, 18 Apr 2024 21:52:31 -0500 Subject: [PATCH] test(linux-client): move linux-group test out of integration tests (#4692) Closes #4669 This should stop the problem of `linux-group` failing because of trying to test an older release that doesn't have the right CLI features --------- Co-authored-by: Jamil Co-authored-by: Thomas Eizinger --- .github/workflows/_integration_tests.yml | 1 - .github/workflows/_rust.yml | 22 ++++++++++++++++++++++ scripts/tests/linux-group.sh | 7 +++---- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/.github/workflows/_integration_tests.yml b/.github/workflows/_integration_tests.yml index 9dae22502..10c9f2cfc 100644 --- a/.github/workflows/_integration_tests.yml +++ b/.github/workflows/_integration_tests.yml @@ -106,7 +106,6 @@ jobs: direct-download-roaming-network, dns-failsafe, # Uses the default DNS control method dns-nm, - # linux-group, # Stub, doesn't run Firezone code yet. (broken compat test) relay-graceful-shutdown, relayed-curl-api-down, relayed-curl-api-restart, diff --git a/.github/workflows/_rust.yml b/.github/workflows/_rust.yml index 38c8e7ffd..f2883b80b 100644 --- a/.github/workflows/_rust.yml +++ b/.github/workflows/_rust.yml @@ -119,3 +119,25 @@ jobs: - name: Run smoke tests (Windows) if: ${{ runner.os == 'Windows' }} run: bash ../../scripts/tests/smoke-test-gui-windows.sh + + headless-client: + name: headless-client-${{ matrix.test }}-${{ matrix.runs-on }} + strategy: + fail-fast: false + matrix: + # TODO: Add Windows as part of issue #3782 + runs-on: [ubuntu-20.04, ubuntu-22.04] + test: [linux-group] + runs-on: ${{ matrix.runs-on }} + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup-rust + - run: cargo build -p firezone-headless-client + env: + CONNLIB_LOG_UPLOAD_INTERVAL_SECS: 300 + name: "cargo build" + shell: bash + - run: scripts/tests/${{ matrix.test }}.sh + name: "test script" + shell: bash + working-directory: ./ diff --git a/scripts/tests/linux-group.sh b/scripts/tests/linux-group.sh index c78f029e1..bb9ca3cf6 100755 --- a/scripts/tests/linux-group.sh +++ b/scripts/tests/linux-group.sh @@ -16,10 +16,9 @@ function print_debug_info { trap print_debug_info EXIT -# Copy the Linux Client out of its container -docker compose exec client cat firezone-linux-client > "$BINARY_NAME" -chmod u+x "$BINARY_NAME" -sudo mv "$BINARY_NAME" "/usr/bin/$BINARY_NAME" +# Copy the Linux Client out of the build dir +ls . ./rust ./rust/target ./rust/target/debug +sudo cp "rust/target/debug/firezone-headless-client" "/usr/bin/$BINARY_NAME" sudo cp "scripts/tests/systemd/$SERVICE_NAME.service" /usr/lib/systemd/system/