qa: Update scripts
This commit is contained in:
parent
d2f409db7a
commit
d4990916b5
6 changed files with 77 additions and 24 deletions
|
|
@ -1,25 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
NB_THEMES_TODO=3
|
||||
MIN_LVL_TODO=1
|
||||
MAX_LVL_TODO=3
|
||||
#!/bin/bash
|
||||
|
||||
source qa-common.sh
|
||||
|
||||
MIN_EXO_TODO=$(($MIN_LVL_TODO - 1))
|
||||
MAX_EXO_TODO=$(($MAX_LVL_TODO - 1))
|
||||
MAX_EXO_TODO=$(($MAX_LVL_TODO))
|
||||
|
||||
curl -s http://127.0.0.1:8081/api/teams/ | jq -r '.[] | [(.id | tostring), " ", .name] | add' | while read TEAMID TEAMSTR
|
||||
curl -s http://${HOST_FICADMIN}/api/teams | jq -r '.[] | [(.id | tostring), " ", .name] | add' | while read TEAMID TEAMSTR
|
||||
do
|
||||
if echo $TEAMSTR | grep "FIC Groupe" > /dev/null 2> /dev/null
|
||||
if echo $TEAMSTR | grep "${TEAM_PREFIX}" > /dev/null 2> /dev/null
|
||||
then
|
||||
GRPFIC=$(echo $TEAMSTR | sed -r 's/FIC Groupe //')
|
||||
GRPFIC=$(echo $TEAMSTR | sed -r "s/${TEAM_PREFIX} //")
|
||||
|
||||
THEMES_TO_TESTS=$(curl -s http://127.0.0.1:8081/api/themes | jq -r '.[] | [(.id | tostring), " ", (.path | split("-") | .[0])] | add' | grep -v " $GRPFIC" | shuf | head -n $NB_THEMES_TODO | cut -d " " -f 1 | xargs | sed 's/^/"/;s/ /","/g;s/$/"/')
|
||||
THEMES_TO_TESTS=$(curl -s http://${HOST_FICADMIN}/api/themes | jq -r '.[] | [(.id | tostring), " ", (.path | split("-") | .[0])] | add' | grep -v " grp$GRPFIC" | shuf | head -n $NB_THEMES_TODO | cut -d " " -f 1 | xargs | sed 's/^/"/;s/ /","/g;s/$/"/')
|
||||
|
||||
curl -s http://127.0.0.1:8081/api/themes.json | jq -r '.['$THEMES_TO_TESTS'] | .exercices | keys | .['$MIN_EXO_TODO:$MAX_EXO_TODO'] | .[]' | while read EXID
|
||||
curl -s http://${HOST_FICADMIN}/api/themes.json | jq -r '.['$THEMES_TO_TESTS'] | .exercices['$MIN_EXO_TODO:$MAX_EXO_TODO'] | .[].id' | while read EXID
|
||||
do
|
||||
#curl -X POST -d @- -H "X-FIC-Team: nemunaire" http://127.0.0.1:8083/api/qa_work.json <<EOF
|
||||
cat <<EOF
|
||||
curl -X POST -d @- -H "X-FIC-Team: ${QA_ADMIN}" http://${HOST_FICQA}/api/qa_work.json <<EOF
|
||||
{"id_team": $TEAMID, "id_exercice": $EXID}
|
||||
EOF
|
||||
done
|
||||
|
|
|
|||
Reference in a new issue