Skip to content

Commit

Permalink
not sure how to test this yet
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Feb 23, 2023
1 parent 5919e5a commit 7fe902f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 32 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/python-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,3 @@ jobs:
export FLUX_USER=fluxuser
export FLUX_TOKEN=12345
pytest -xs flux_restful_client/tests/test_api.py
test-pam-auth:
needs: [prepare-container]
runs-on: ubuntu-latest
services:
api:
env:
INSTALL_BRANCH: ${{ needs.prepare-container.outputs.branch }}
INSTALL_REPO: ${{ github.repository }}
FLUX_ENABLE_PAM: true
FLUX_REQUIRE_AUTH: true
image: ghcr.io/flux-framework/flux-restful-api:latest
ports:
- 5000:5000
steps:
- uses: actions/checkout@v3
- name: Run tests with auth
run: |
cd clients/python
pip install -e .[all]
sudo useradd -m -p $(openssl passwd '12345') "fluxuser" || echo "Already exists."
flux start sleep infinity &
pid=$!
sudo -E PATH=PATH -E PYTHONPATH=PYTHONPATH -u fluxuser pytest -xs flux_restful_client/tests/test_api.py
10 changes: 2 additions & 8 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,5 @@ jobs:
flux start sleep infinity &
pid=$!
sudo useradd -m -p $(openssl passwd '12345') "fluxuser" || echo "Already exists."
unset FLUX_USER
unset FLUX_TOKEN
export TEST_PAM_AUTH=true
export FLUX_REQUIRE_AUTH=true
export TEST_PAM_AUTH_FAIL=false
sudo -E PATH=PATH -E PYTHONPATH=PYTHONPATH -u fluxuser pytest -xs tests/test_api.py
kill -9 $pid
# TODO how to test pam in this mode?
# We would need to start flux as flux and run tests as a user

0 comments on commit 7fe902f

Please sign in to comment.