Browse Source

génère des tests curl d'après la liste de routes fournit

nas 3 years ago
parent
commit
2064511ba4
2 changed files with 27 additions and 0 deletions
  1. 24
    0
      test/remote/gen_test_routes.sh
  2. 3
    0
      test/remote/routes.list

+ 24
- 0
test/remote/gen_test_routes.sh View File

@@ -0,0 +1,24 @@
1
+#!/bin/sh
2
+
3
+echo "Will generate curl tests for every routes declared routes.list"
4
+
5
+test_template="#!/bin/sh \n
6
+\n
7
+echo \"Will test route $line\" ;\n
8
+curl \n
9
+";
10
+file="routes.list";
11
+
12
+if [ -f "$file" ]
13
+then
14
+    echo "$file found."
15
+
16
+    while read line
17
+    do
18
+	script_name=`echo $line | sed -e "s/\//-/g"`
19
+	echo $test_template #> "test$script_name"
20
+    done < "$file"
21
+
22
+else
23
+    echo "$file not found."
24
+fi

+ 3
- 0
test/remote/routes.list View File

@@ -0,0 +1,3 @@
1
+/path/login	
2
+/path/tasks	
3
+/path/status	

Loading…
Cancel
Save