Changeset 5d927631
- Timestamp:
- 2021-03-31T11:50:18Z (4 years ago)
- Children:
- 07ade22
- Parents:
- 0a98f92
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
.github/workflows/ci.yml
r0a98f92 r5d927631 19 19 - name: build bitlbee 20 20 run: | 21 ./configure --asan=1 21 ./configure --asan=1 --twitter=0 22 22 cat ./.tests/gcovflags >> Makefile.settings 23 23 make … … 40 40 41 41 ./.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 42 62 43 63 - name: jabber connect -
.tests/btlib.py
r0a98f92 r5d927631 159 159 return ret 160 160 161 def 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 166 def 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 175 def 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 186 def 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 161 191 def add_buddy_test(clis): 162 192 clis[0].add_jabber_buddy(clis[1].nick) -
.tests/setup_bitlbee.sh
r0a98f92 r5d927631 1 1 #!/bin/bash 2 2 3 killall bitlbee 3 killall bitlbee >/dev/null 2>/dev/null 4 4 5 5 set -e -
.tests/setup_prosody.sh
r0a98f92 r5d927631 1 1 #!/bin/bash 2 2 3 sudo prosodyctl deluser test1@localhost 4 sudo prosodyctl deluser test2@localhost 5 sudo prosodyctl stop 3 sudo prosodyctl deluser test1@localhost >/dev/null 2>/dev/null 4 sudo prosodyctl deluser test2@localhost >/dev/null 2>/dev/null 5 sudo prosodyctl stop >/dev/null 2>/dev/null 6 6 7 7 set -e
Note: See TracChangeset
for help on using the changeset viewer.