From 97c2c73a5ccce26a91bdaaf811e7b681ebd0d724 Mon Sep 17 00:00:00 2001 From: omri zaher Date: Fri, 19 Sep 2025 14:31:58 +0300 Subject: [PATCH] test --- .github/workflows/e2e-testing.yml | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/.github/workflows/e2e-testing.yml b/.github/workflows/e2e-testing.yml index 544d6d93a..3b7b97a51 100644 --- a/.github/workflows/e2e-testing.yml +++ b/.github/workflows/e2e-testing.yml @@ -99,27 +99,22 @@ jobs: python -m pip install --upgrade pip pip install -r requirements.txt - - name: Add test user to EC2 MongoDB + - name: Create test user via Wekan API uses: appleboy/ssh-action@v1.0.3 with: host: ${{ secrets.WEKAN_EC2_HOST_IP }} username: ubuntu key: ${{ secrets.EC2_SSH_KEY }} script: | - sudo docker exec wekan-db mongosh wekan --eval ' - db.users.updateOne( - { username: "omriza5" }, - { - $setOnInsert: { - username: "omriza5", - password: "123456", - email: "omriza5@gmail.com", - isAdmin: false - } - }, - { upsert: true } - ) - ' + # Wait for Wekan to be ready + sleep 30 + + # Create test user via registration API (no admin token needed) + curl -f -H "Content-type:application/json" \ + -X POST \ + http://localhost/users/register \ + -d '{ "username": "omriza5", "password": "123456", "email": "omriza5@gmail.com" }' \ + || echo "User registration failed or user already exists" - name: Run API tests env: