Browse Source

[mod] checker: add some additional tests

BTW: fix indentation by 2 spaces

The additional tests has been commented out in the google engines to not release
any CAPTCHA issues.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Markus Heiser 4 years ago
parent
commit
e436287385
1 changed files with 42 additions and 16 deletions
  1. 42 16
      searx/settings.yml

+ 42 - 16
searx/settings.yml

@@ -109,7 +109,7 @@ checker:
     # scheduling: interval or int
     # scheduling: interval or int
     # use "scheduling: False" to disable scheduling
     # use "scheduling: False" to disable scheduling
     # to activate the scheduler:
     # to activate the scheduler:
-    # * uncomment "scheduling" section 
+    # * uncomment "scheduling" section
     # * add "cache2 = name=searxcache,items=2000,blocks=2000,blocksize=4096,bitmap=1" to your uwsgi.ini
     # * add "cache2 = name=searxcache,items=2000,blocks=2000,blocksize=4096,bitmap=1" to your uwsgi.ini
 
 
     # scheduling:
     # scheduling:
@@ -117,24 +117,36 @@ checker:
     #    every: [86400, 90000]  # how often the checker runs
     #    every: [86400, 90000]  # how often the checker runs
 
 
     # additional tests: only for the YAML anchors (see the engines section)
     # additional tests: only for the YAML anchors (see the engines section)
+
     additional_tests:
     additional_tests:
-        rosebud: &test_rosebud
-          matrix:
-              query: rosebud
-              lang: en
-          result_container:
-              - not_empty
-              - ['one_title_contains', 'citizen kane']
-          test:
-              - unique_results
+      rosebud: &test_rosebud
+        matrix:
+          query: rosebud
+          lang: en
+        result_container:
+          - not_empty
+          - ['one_title_contains', 'citizen kane']
+        test:
+          - unique_results
+
+      android: &test_android
+        matrix:
+          query: ['android']
+          lang: ['en', 'de', 'fr', 'zh-CN']
+        result_container:
+          - not_empty
+          - ['one_title_contains', 'google']
+        test:
+          - unique_results
+
     # tests: only for the YAML anchors (see the engines section)
     # tests: only for the YAML anchors (see the engines section)
     tests:
     tests:
-        infobox: &tests_infobox
-          infobox:
-              matrix:
-                  query: ["linux", "new york", "bbc"]
-              result_container:
-                  - has_infobox
+      infobox: &tests_infobox
+        infobox:
+          matrix:
+            query: ["linux", "new york", "bbc"]
+          result_container:
+            - has_infobox
 
 
 engines:
 engines:
   - name: apk mirror
   - name: apk mirror
@@ -480,18 +492,32 @@ engines:
   - name : google
   - name : google
     engine : google
     engine : google
     shortcut : go
     shortcut : go
+    # additional_tests:
+    #   android: *test_android
 
 
   - name : google images
   - name : google images
     engine : google_images
     engine : google_images
     shortcut : goi
     shortcut : goi
+    # additional_tests:
+    #   android: *test_android
+    #   dali:
+    #     matrix:
+    #       query: ['Dali Christ']
+    #       lang: ['en', 'de', 'fr', 'zh-CN']
+    #     result_container:
+    #       - ['one_title_contains', 'Salvador']
 
 
   - name : google news
   - name : google news
     engine : google_news
     engine : google_news
     shortcut : gon
     shortcut : gon
+    # additional_tests:
+    #   android: *test_android
 
 
   - name : google videos
   - name : google videos
     engine : google_videos
     engine : google_videos
     shortcut : gov
     shortcut : gov
+    # additional_tests:
+    #   android: *test_android
 
 
   - name : google scholar
   - name : google scholar
     engine : xpath
     engine : xpath