mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-04-28 03:20:11 +00:00
fix: use $HOME for cookie file in demo server workflow
The /tmp directory on the demo server isn't writable by the relay user, causing the verification step's cookie file to silently fail. This meant the /api/state request had no session cookie and returned 401, making the node count check report 0 nodes. Use $HOME instead of /tmp for the cookie file path.
This commit is contained in:
parent
ed1ec49a71
commit
b501820899
1 changed files with 2 additions and 1 deletions
3
.github/workflows/update-demo-server.yml
vendored
3
.github/workflows/update-demo-server.yml
vendored
|
|
@ -143,8 +143,9 @@ jobs:
|
|||
fi
|
||||
|
||||
# Verify mock mode is active by authenticating and checking node count
|
||||
# Uses $HOME for cookie file since /tmp may not be writable by all users
|
||||
NODES=$(ssh -i ~/.ssh/id_ed25519 ${{ secrets.DEMO_SERVER_USER }}@${{ secrets.DEMO_SERVER_HOST }} \
|
||||
'curl -s -c /tmp/demo-cookies.txt http://localhost:7655/api/login -X POST -H "Content-Type: application/json" -d "{\"username\":\"demo\",\"password\":\"demo\"}" > /dev/null && curl -s -b /tmp/demo-cookies.txt http://localhost:7655/api/state | jq -r ".nodes | length" && rm -f /tmp/demo-cookies.txt')
|
||||
'curl -s -c $HOME/.demo-cookies.txt http://localhost:7655/api/login -X POST -H "Content-Type: application/json" -d "{\"username\":\"demo\",\"password\":\"demo\"}" > /dev/null && curl -s -b $HOME/.demo-cookies.txt http://localhost:7655/api/state | jq -r ".nodes | length" && rm -f $HOME/.demo-cookies.txt')
|
||||
|
||||
echo "Mock nodes detected: $NODES"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue