Skip to content
Permalink
Browse files

Fix bot configs

  • Loading branch information...
selevit committed Nov 20, 2016
1 parent 6d5851d commit 429a880333db04fdd0614d473dcf2c8c78f000d8
Showing with 8 additions and 9 deletions.
  1. +3 −2 .travis.yml
  2. +1 −4 ci/run_bot_tests.py
  3. +1 −1 grabpage-bot/bot-spec.yml
  4. +1 −0 guido-bot/bot-spec.yml
  5. +1 −1 hello/bot-spec.yml
  6. +1 −1 sovet-bot/bot-spec.yml
@@ -17,6 +17,7 @@ env:
DOCKER_REGISTRY_HOST: docker.io
DOCKER_REGISTRY_LOGIN:
DOCKER_REGISTRY_PASSWORD:
BOTS_WAIT_TIMEOUT: 60

before_install:
- pip install docker-compose==1.9.0
@@ -32,8 +33,8 @@ before_script:
script:
- set -e
- echo "Waiting nginx-bot to launch on nginx-bot:443..."
- while ! wget --no-check-certificate https://localhost/ping &> /dev/null; do sleep 1; done
- echo "Waiting 30 seconds to ensure if all bots are ready..."; sleep 30
- while ! wget --no-check-certificate https://localhost/ping &> /dev/null; do sleep 1;
- echo "Waiting $BOTS_WAIT_TIMEOUT seconds to ensure if all bots are ready..."; sleep "$BOTS_WAIT_TIMEOUT"
- BOT_BASE_URL="https://localhost" python ci/run_bot_tests.py .
- |
if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
@@ -1,7 +1,6 @@
#!/usr/bin/env python3

import os
import re
import sys
import argparse
import logging
@@ -93,9 +92,7 @@ def run_bot_testcase(url, test_case) -> bool:
)
result = False

if not test_case.response.text_regexp.match(
response_data.get('text', ""), re.M
):
if not test_case.response.text_regexp.match(response_data.get('text', "")):
logger.error(
'{} does not match the regexp {}.'
' Be careful with escaping of regex\'s special symbols.'.format(
@@ -6,4 +6,4 @@ ignored_commands:

test_cases:
- command: "https://radio-t.com/p/2016/11/06/bot/"
result: ".+"
result: "\\n.+"
@@ -1,4 +1,5 @@
bot_name: "guido-bot"
bot_display_name: "g-bot"

ignored_commands:
- "Привет"
@@ -5,4 +5,4 @@ ignored_commands:

test_cases:
- command: "Привет"
result: "Hello!"
result: ".+"
@@ -8,5 +8,5 @@ test_cases:
- command: "совет"
result: ".+"

- command: "sovet"
- command: "как жить?"
result: ".+"

0 comments on commit 429a880

Please sign in to comment.
You can’t perform that action at this time.