-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
162 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Push Workflow | ||
|
||
on: push | ||
|
||
jobs: | ||
run_tests: | ||
name: Run Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Requirements | ||
run: pip install -r door_ivr/requirements.txt | ||
- name: Run tests | ||
working-directory: door_ivr/tests/ | ||
timeout-minutes: 1 | ||
run: > | ||
python backend_mock.py & | ||
sleep 1 && | ||
echo "=== TEST RUN NORMAL ===" && | ||
./run-test.sh agi-test.txt 2>&1 | tee agi-test-result.txt && | ||
echo "=== TEST UNKNOWN NUMBER ===" && | ||
./run-test.sh agi-unknown-number.txt 2>&1 | tee agi-test-unknown-number-result.txt | ||
- name: Compare results | ||
working-directory: door_ivr/tests/ | ||
run: > | ||
echo "=== COMPARE RUN NORMAL ===" && | ||
diff -U 3 agi-test-expected.txt agi-test-result.txt && | ||
echo "=== COMPARE UNKNOWN NUMBER ===" && | ||
diff -U 3 agi-test-unknown-number-expected.txt agi-test-unknown-number-result.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
ARGS: ['../door_ivr.py', '--handler=external', '--config=../door_ivr.test.conf'] | ||
ENV LINE: agi_callerid: 0881234567 | ||
ENV LINE: | ||
class AGI: self.env = {'agi_callerid': '0881234567'} | ||
COMMAND: VERBOSE "External phone door IVR received a call from '0881234567'" 1 | ||
VERBOSE "External phone door IVR received a call from '0881234567'" 1 | ||
RESULT_LINE: 200 result=1 | ||
RESULT_DICT: {'result': ('1', '')} | ||
COMMAND: ANSWER | ||
ANSWER | ||
RESULT_LINE: 200 result=0 | ||
RESULT_DICT: {'result': ('0', '')} | ||
COMMAND: STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/welcome "0123456789" 0 | ||
STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/welcome "0123456789" 0 | ||
RESULT_LINE: 200 result=0 | ||
RESULT_DICT: {'result': ('0', '')} | ||
COMMAND: STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/enter_pin "0123456789" 0 | ||
STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/enter_pin "0123456789" 0 | ||
RESULT_LINE: 200 result=0 | ||
RESULT_DICT: {'result': ('0', '')} | ||
COMMAND: WAIT FOR DIGIT 12000 | ||
WAIT FOR DIGIT 12000 | ||
RESULT_LINE: 200 result=49 | ||
RESULT_DICT: {'result': ('49', '')} | ||
COMMAND: WAIT FOR DIGIT 4000 | ||
WAIT FOR DIGIT 4000 | ||
RESULT_LINE: 200 result=50 | ||
RESULT_DICT: {'result': ('50', '')} | ||
COMMAND: WAIT FOR DIGIT 4000 | ||
WAIT FOR DIGIT 4000 | ||
RESULT_LINE: 200 result=51 | ||
RESULT_DICT: {'result': ('51', '')} | ||
COMMAND: WAIT FOR DIGIT 4000 | ||
WAIT FOR DIGIT 4000 | ||
RESULT_LINE: 200 result=52 | ||
RESULT_DICT: {'result': ('52', '')} | ||
COMMAND: WAIT FOR DIGIT 4000 | ||
WAIT FOR DIGIT 4000 | ||
RESULT_LINE: 200 result=53 | ||
RESULT_DICT: {'result': ('53', '')} | ||
COMMAND: WAIT FOR DIGIT 4000 | ||
WAIT FOR DIGIT 4000 | ||
RESULT_LINE: 200 result=54 | ||
RESULT_DICT: {'result': ('54', '')} | ||
COMMAND: WAIT FOR DIGIT 4000 | ||
WAIT FOR DIGIT 4000 | ||
RESULT_LINE: 200 result=35 | ||
RESULT_DICT: {'result': ('35', '')} | ||
COMMAND: STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/door_prompt_1 "1239" 0 | ||
STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/door_prompt_1 "1239" 0 | ||
RESULT_LINE: 200 result=49 | ||
RESULT_DICT: {'result': ('49', '')} | ||
COMMAND: STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/door_opened_1 "" 0 | ||
STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/door_opened_1 "" 0 | ||
RESULT_LINE: 200 result=0 | ||
RESULT_DICT: {'result': ('0', '')} | ||
COMMAND: STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/door_prompt_1 "1239" 0 | ||
STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/door_prompt_1 "1239" 0 | ||
RESULT_LINE: 200 result=0 | ||
RESULT_DICT: {'result': ('0', '')} | ||
COMMAND: STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/door_prompt_2 "1239" 0 | ||
STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/door_prompt_2 "1239" 0 | ||
RESULT_LINE: 200 result=0 | ||
RESULT_DICT: {'result': ('0', '')} | ||
COMMAND: STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/door_prompt_3 "1239" 0 | ||
STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/door_prompt_3 "1239" 0 | ||
RESULT_LINE: 200 result=50 | ||
RESULT_DICT: {'result': ('50', '')} | ||
COMMAND: STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/door_opened_2 "" 0 | ||
STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/door_opened_2 "" 0 | ||
RESULT_LINE: 200 result=0 | ||
RESULT_DICT: {'result': ('0', '')} | ||
COMMAND: STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/door_prompt_1 "1239" 0 | ||
STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/door_prompt_1 "1239" 0 | ||
RESULT_LINE: 200 result=0 | ||
RESULT_DICT: {'result': ('0', '')} | ||
COMMAND: STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/door_prompt_2 "1239" 0 | ||
STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/door_prompt_2 "1239" 0 | ||
RESULT_LINE: 200 result=0 | ||
RESULT_DICT: {'result': ('0', '')} | ||
COMMAND: STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/door_prompt_3 "1239" 0 | ||
STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/door_prompt_3 "1239" 0 | ||
RESULT_LINE: 200 result=57 | ||
RESULT_DICT: {'result': ('57', '')} | ||
COMMAND: STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/door_locked "" 0 | ||
STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/door_locked "" 0 | ||
RESULT_LINE: 200 result=0 | ||
RESULT_DICT: {'result': ('0', '')} | ||
COMMAND: STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/goodbye "" 0 | ||
STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/goodbye "" 0 | ||
RESULT_LINE: 200 result=0 | ||
RESULT_DICT: {'result': ('0', '')} | ||
COMMAND: HANGUP | ||
HANGUP | ||
RESULT_LINE: 200 | ||
RESULT_DICT: {'result': ('', '')} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
ARGS: ['../door_ivr.py', '--handler=external', '--config=../door_ivr.test.conf'] | ||
ENV LINE: agi_callerid: +359880000000 | ||
ENV LINE: | ||
class AGI: self.env = {'agi_callerid': '+359880000000'} | ||
COMMAND: VERBOSE "External phone door IVR received a call from '+359880000000'" 1 | ||
VERBOSE "External phone door IVR received a call from '+359880000000'" 1 | ||
RESULT_LINE: 200 | ||
RESULT_DICT: {'result': ('', '')} | ||
COMMAND: GET VARIABLE "FALLBACK_EXTENSION" | ||
GET VARIABLE "FALLBACK_EXTENSION" | ||
RESULT_LINE: 200 | ||
RESULT_DICT: {'result': ('', '')} | ||
COMMAND: ANSWER | ||
ANSWER | ||
RESULT_LINE: 200 | ||
RESULT_DICT: {'result': ('', '')} | ||
COMMAND: STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/welcome "" 0 | ||
STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/welcome "" 0 | ||
RESULT_LINE: 200 result=101 | ||
RESULT_DICT: {'result': ('101', '')} | ||
COMMAND: STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/redirecting_to_public_phone "" 0 | ||
STREAM FILE /home/runner/work/initlab-telephony/initlab-telephony/door_ivr/tests/initlab-telephony-assets/files/bg/redirecting_to_public_phone "" 0 | ||
RESULT_LINE: 200 result=0 | ||
RESULT_DICT: {'result': ('0', '')} | ||
COMMAND: SET EXTENSION 1234 | ||
SET EXTENSION 1234 | ||
RESULT_LINE: 200 | ||
RESULT_DICT: {'result': ('', '')} | ||
COMMAND: set priority 1 | ||
set priority 1 | ||
RESULT_LINE: 200 | ||
RESULT_DICT: {'result': ('', '')} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters