updated tests
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Failing after 8s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Failing after 7s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Failing after 6s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Failing after 8s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Failing after 7s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Failing after 6s
This commit is contained in:
1 parent
f2a11fa1db
commit
a579bfaf85
2 files changed
+21
-3
No files matched your search
@@ -9,7 +9,7 @@ jobs:
|
||||
- name: prepare-container
|
||||
run: |
|
||||
echo "192.168.3.113 gitea.home.com" >> /etc/hosts && \
|
||||
apk add sqlite-dev bash
|
||||
apk add sqlite-dev bash curl
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Building binary with make
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
- name: prepare-container
|
||||
run: |
|
||||
echo "192.168.3.113 gitea.home.com" >> /etc/hosts && \
|
||||
apk add cmake sqlite-dev bash
|
||||
apk add cmake sqlite-dev bash curl
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Building binary with CMake
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
- name: prepare-container
|
||||
run: |
|
||||
echo "192.168.3.113 gitea.home.com" >> /etc/hosts && \
|
||||
apk add meson ninja cmake sqlite-dev bash
|
||||
apk add meson ninja cmake sqlite-dev bash curl
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Building binary with meson
|
||||
|
||||
@@ -10,6 +10,8 @@ CYAN="\033[0;36m"
|
||||
|
||||
./auth_service &> auth_service.log &
|
||||
sleep 0.1
|
||||
success=0
|
||||
errors=0
|
||||
|
||||
# test /api/token
|
||||
printf "==> ${BLUE}Testing${CYAN} POST${BWHITE} /api/token${RESET} "
|
||||
@@ -18,8 +20,10 @@ sleep 0.1
|
||||
res=$(cat api_token_test.log)
|
||||
if [[ "$res" == *"token"* ]]; then
|
||||
printf "[$GREEN OK $RESET]\n"
|
||||
success=$(($success+1))
|
||||
else
|
||||
printf "[$RED ERR $RESET]\n==> ${BLUE}Response: $RESET$(echo $res)\n"
|
||||
errors=$(($errors+1))
|
||||
fi
|
||||
|
||||
# test /api/token/verify
|
||||
@@ -29,8 +33,10 @@ sleep 0.1
|
||||
res=$(cat api_token_verify_test.log)
|
||||
if [[ "$res" == *'{"valid":"true"}'* ]]; then
|
||||
printf "[$GREEN OK $RESET]\n"
|
||||
success=$(($success+1))
|
||||
else
|
||||
printf "[$RED ERR $RESET]\n==> ${BLUE}Response: $RESET$(echo $res)\n"
|
||||
errors=$(($errors+1))
|
||||
fi
|
||||
|
||||
# test /api/users
|
||||
@@ -40,8 +46,10 @@ sleep 0.1
|
||||
res=$(cat api_users_test.log)
|
||||
if [[ "$res" == *'username'* ]]; then
|
||||
printf "[$GREEN OK $RESET]\n"
|
||||
success=$(($success+1))
|
||||
else
|
||||
printf "[$RED ERR $RESET]\n==> ${BLUE}Response: $RESET$(echo $res)\n"
|
||||
errors=$(($errors+1))
|
||||
fi
|
||||
|
||||
# test /api/users/user
|
||||
@@ -51,8 +59,10 @@ sleep 0.1
|
||||
res=$(cat api_users_user_test.log)
|
||||
if [[ "$res" == *'username'* ]]; then
|
||||
printf "[$GREEN OK $RESET]\n"
|
||||
success=$(($success+1))
|
||||
else
|
||||
printf "[$RED ERR $RESET]\n==> ${BLUE}Response: $RESET$(echo $res)\n"
|
||||
errors=$(($errors+1))
|
||||
fi
|
||||
|
||||
# test /api/register
|
||||
@@ -68,8 +78,10 @@ sleep 0.1
|
||||
res=$(cat api_register_test.log)
|
||||
if [[ "$res" == *'username'* ]]; then
|
||||
printf "[$GREEN OK $RESET]\n"
|
||||
success=$(($success+1))
|
||||
else
|
||||
printf "[$RED ERR $RESET]\n==> ${BLUE}Response: $RESET$(echo $res)\n"
|
||||
errors=$(($errors+1))
|
||||
fi
|
||||
|
||||
# test /api/users/add
|
||||
@@ -86,10 +98,16 @@ sleep 0.1
|
||||
res=$(cat api_users_add_test.log)
|
||||
if [[ "$res" == *'username'* ]]; then
|
||||
printf "[$GREEN OK $RESET]\n"
|
||||
success=$(($success+1))
|
||||
else
|
||||
printf "[$RED ERR $RESET]\n==> ${BLUE}Response: $RESET$(echo $res)\n"
|
||||
errors=$(($errors+1))
|
||||
fi
|
||||
|
||||
# test
|
||||
|
||||
killall auth_service
|
||||
printf "==> ${GREEN}Success: ${RESET}${success}\n==>${RED} Errors: ${RESET}${errors}\n"
|
||||
if [ ! $errors -eq 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
Reference in new issue
Block a user