génère des tests curl d'après la liste de routes fournit
This commit is contained in:
parent
a79c4d4127
commit
2064511ba4
2 changed files with 27 additions and 0 deletions
24
test/remote/gen_test_routes.sh
Normal file
24
test/remote/gen_test_routes.sh
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "Will generate curl tests for every routes declared routes.list"
|
||||
|
||||
test_template="#!/bin/sh \n
|
||||
\n
|
||||
echo \"Will test route $line\" ;\n
|
||||
curl \n
|
||||
";
|
||||
file="routes.list";
|
||||
|
||||
if [ -f "$file" ]
|
||||
then
|
||||
echo "$file found."
|
||||
|
||||
while read line
|
||||
do
|
||||
script_name=`echo $line | sed -e "s/\//-/g"`
|
||||
echo $test_template #> "test$script_name"
|
||||
done < "$file"
|
||||
|
||||
else
|
||||
echo "$file not found."
|
||||
fi
|
||||
3
test/remote/routes.list
Normal file
3
test/remote/routes.list
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
/path/login
|
||||
/path/tasks
|
||||
/path/status
|
||||
Loading…
Add table
Add a link
Reference in a new issue