Changeset 5d92763


Ignore:
Timestamp:
2021-03-31T11:50:18Z (2 weeks ago)
Author:
/ <>
Children:
07ade22
Parents:
0a98f92
Message:

register

Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • .github/workflows/ci.yml

    r0a98f92 r5d92763  
    1919    - name: build bitlbee
    2020      run: |
    21         ./configure --asan=1
     21        ./configure --asan=1 --twitter=0
    2222        cat ./.tests/gcovflags >> Makefile.settings
    2323        make
     
    4040
    4141        ./.tests/cleanup_bitlbee.sh
     42
     43    - name: (un)register
     44        ./.tests/setup_prosody.sh
     45        ./.tests/setup_bitlbee.sh
     46
     47        python3 ./.tests/register.py
     48
     49        ./.tests/cleanup_bitlbee.sh
     50        ./.tests/setup_bitlbee.sh
     51
     52        python3 ./.tests/identify.py
     53        python3 ./.tests/unregister.py
     54
     55        ./.tests/cleanup_bitlbee.sh
     56        ./.tests/setup_bitlbee.sh
     57       
     58        python3 ./.tests/identify_empty.py
     59
     60        ./.tests/cleanup_bitlbee.sh
     61        ./.tests/cleanup_prosody.sh
    4262
    4363    - name: jabber connect
  • .tests/btlib.py

    r0a98f92 r5d92763  
    159159    return ret
    160160
     161def register_test(clis):
     162    clis[1].send_priv_msg("&bitlbee", "register "+clis[1].pwd*2)
     163    time.sleep(0.5)
     164    return (clis[1].receive().find('Account successfully created') != -1)
     165   
     166def unregister_test(clis):
     167    clis[1].send_priv_msg("&bitlbee", "drop "+clis[1].pwd*2)
     168    time.sleep(0.5)
     169    ret = (clis[1].receive().find('removed') != -1)
     170    clis[1].send_priv_msg("&bitlbee", "drop "+clis[1].pwd*2)
     171    time.sleep(0.5)
     172    ret = ret & (clis[1].receive().find('That account does not exist') != -1)
     173    return ret
     174
     175def identify_test(clis):
     176    ret = True
     177    clis[1].send_priv_msg("&bitlbee", "register "+clis[1].pwd)
     178    time.sleep(0.5)
     179    ret = ret & (clis[1].receive().find('Incorrect password') != -1)
     180
     181    clis[1].send_priv_msg("&bitlbee", "register "+clis[1].pwd*2)
     182    time.sleep(0.5)
     183    ret = ret & (clis[1].receive().find('Password accepted') != -1)
     184    return ret
     185
     186def identify_nonexist_test(clis):
     187    clis[1].send_priv_msg("&bitlbee", "register "+clis[1].pwd)
     188    time.sleep(0.5)
     189    return (clis[1].receive().find('The nick is (probably) not registered') != -1)
     190
    161191def add_buddy_test(clis):
    162192    clis[0].add_jabber_buddy(clis[1].nick)
  • .tests/setup_bitlbee.sh

    r0a98f92 r5d92763  
    11#!/bin/bash
    22
    3 killall bitlbee
     3killall bitlbee >/dev/null 2>/dev/null
    44
    55set -e
  • .tests/setup_prosody.sh

    r0a98f92 r5d92763  
    11#!/bin/bash
    22
    3 sudo prosodyctl deluser test1@localhost
    4 sudo prosodyctl deluser test2@localhost
    5 sudo prosodyctl stop
     3sudo prosodyctl deluser test1@localhost >/dev/null 2>/dev/null
     4sudo prosodyctl deluser test2@localhost >/dev/null 2>/dev/null
     5sudo prosodyctl stop >/dev/null 2>/dev/null
    66
    77set -e
Note: See TracChangeset for help on using the changeset viewer.