Commit 3f7e082a authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Check for bug 309. Bug 334 was found while writing this test case;

setup_xfail for it.
parent 6e543aff
# Test suite for lyskomd.
# Copyright (C) 2001 Lysator Academic Computer Association.
#
# This file is part of the LysKOM server.
#
# LysKOM is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 1, or (at your option)
# any later version.
#
# LysKOM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with LysKOM; see the file COPYING. If not, write to
# Lysator, c/o ISY, Linkoping University, S-581 83 Linkoping, SWEDEN,
# or the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
# MA 02139, USA.
#
# Please mail bug reports to bug-lyskom@lysator.liu.se.
# Check that the server handles super_conf and supervisor correctly,
# especially when aux-items are removed.
# There are three major players:
#
# 5. (client 0) The administrator.
# 6. (client 1)
# 7. (client 2)
#
# There are a few conferences:
#
# 8. Created by 5. rd-prot. Members: 7. Supervisor: 6. Super-conf: 6.
# 9. Created by 5. Public. Members: 5. Supervisor: 5. Super-conf: 7.
# 10. Created by 5. Public. Members: 5. Supervisor: 7. Super-conf: 5.
# 11. Created by 5. Public. Members: 5. Supervisor: 5. Super-conf: 13.
# 12. Created by 5. Public. Members: 5. Supervisor: 8. Super-conf: 8.
# 13. Created by 6. Public. Members: 6, 7. Supervisor: 6. Super-conf: 7.
proc enable {} {
send "990 42 255\n"
simple_expect "=990"
}
proc disable {} {
send "991 42 0\n"
simple_expect "=991"
}
read_versions
lyskomd_start
client_start 0
talk_to client 0
send "A3Hfoo\n"
simple_expect "LysKOM"
send "1000 62 5 [holl "gazonk"] 1\n"
simple_expect "=1000"
# Populate the database.
client_start 1
talk_to client 1
send "A3Hbar\n"
simple_expect "LysKOM"
send "1001 89 [holl "Person 6"] [holl "pswd6"] 00 0 { }\n"
simple_expect "=1001 6"
send "1002 62 6 [holl "pswd6"] 1\n"
simple_expect "=1002"
client_start 2
talk_to client 2
send "A 10Hfoo@bar.se\n"
simple_expect "LysKOM"
send "1003 89 [holl "Person 7"] [holl "pswd7"] 00 0 { }\n"
simple_expect "=1003 7"
send "1004 62 7 [holl "pswd7"] 1\n"
simple_expect "=1004"
# Create the conferences.
talk_to client 0
send "1005 88 [holl "conf 8"] 1000 0 { }\n"
simple_expect "=1005 8"
send "1006 88 [holl "conf 9"] 0000 0 { }\n"
simple_expect "=1006 9"
send "1007 88 [holl "conf 10"] 0000 000 { }\n"
simple_expect "=1007 10"
send "1008 88 [holl "conf 11"] 0000 0 { }\n"
simple_expect "=1008 11"
send "1009 88 [holl "conf 12"] 0000 0 { }\n"
simple_expect "=1009 12"
talk_to client 1
send "1010 88 [holl "conf 13"] 0000 0 { }\n"
simple_expect "=1010 13"
# Invite 7 to 8.
talk_to client 2
send "1011 100 8 7 200 200 00000000\n"
simple_expect "%1011 11 8"
talk_to client 0
send "1012 100 8 7 200 200 10000000\n"
simple_expect "=1012"
talk_to client 2
send "1013 100 8 7 200 200 00000000\n"
simple_expect "=1013"
# Let person 5 join several conferences.
talk_to client 0
send "1014 100 9 5 200 200 00000000\n"
simple_expect "=1014"
send "1015 100 10 5 200 200 00000000\n"
simple_expect "=1015"
send "1016 100 11 5 200 200 00000000\n"
simple_expect "=1016"
send "1017 100 12 5 200 200 00000000\n"
simple_expect "=1017"
# Let person 6 join.
talk_to client 1
send "1018 100 13 6 200 200 00000000\n"
simple_expect "=1018"
# Let person 7 join.
talk_to client 2
send "1019 100 13 7 200 200 00000000\n"
simple_expect "=1019"
# Set supervisor and super-conf.
talk_to client 0
send "1020 20 8 6\n"
simple_expect "=1020"
send "1021 18 8 6\n"
simple_expect "=1021"
send "1022 20 9 7\n"
simple_expect "=1022"
send "1023 18 10 7\n"
simple_expect "=1023"
send "1024 20 11 13\n"
simple_expect "=1024"
send "1025 20 12 8\n"
simple_expect "=1025"
send "1026 18 12 8\n"
simple_expect "=1026"
talk_to client 1
send "1027 20 13 7\n"
simple_expect "=1027"
# Let person 5 create six aux-items on conference 8-13,
# two of type alternate-name, two of type redirect (which has
# owner-delete set) and two from the experimental range.
talk_to client 0
enable
send "1028 93 8 0 { } 1 { 10 00000000 1 3Hfoo }\n"
simple_expect "=1028"
send "1029 93 9 0 { } 1 { 10 00000000 1 3Hfoo }\n"
simple_expect "=1029"
send "1030 93 10 0 { } 1 { 10 00000000 1 3Hfoo }\n"
simple_expect "=1030"
send "1031 93 11 0 { } 1 { 10 00000000 1 3Hfoo }\n"
simple_expect "=1031"
send "1032 93 12 0 { } 1 { 10 00000000 1 3Hfoo }\n"
simple_expect "=1032"
send "1033 93 13 0 { } 1 { 10 00000000 1 3Hfoo }\n"
simple_expect "=1033"
send "1034 93 8 0 { } 1 { 10 00000000 1 3Hfoo }\n"
simple_expect "=1034"
send "1035 93 9 0 { } 1 { 10 00000000 1 3Hfoo }\n"
simple_expect "=1035"
send "1036 93 10 0 { } 1 { 10 00000000 1 3Hfoo }\n"
simple_expect "=1036"
send "1037 93 11 0 { } 1 { 10 00000000 1 3Hfoo }\n"
simple_expect "=1037"
send "1038 93 12 0 { } 1 { 10 00000000 1 3Hfoo }\n"
simple_expect "=1038"
send "1039 93 13 0 { } 1 { 10 00000000 1 3Hfoo }\n"
simple_expect "=1039"
send "1040 93 8 0 { } 1 { 8 00000000 1 [holl "E-mail:foo@example.com"] }\n"
simple_expect "=1040"
send "1041 93 9 0 { } 1 { 8 00000000 1 [holl "E-mail:foo@example.com"] }\n"
simple_expect "=1041"
send "1042 93 10 0 { } 1 { 8 00000000 1 [holl "E-mail:foo@example.com"] }\n"
simple_expect "=1042"
send "1043 93 11 0 { } 1 { 8 00000000 1 [holl "E-mail:foo@example.com"] }\n"
simple_expect "=1043"
send "1044 93 12 0 { } 1 { 8 00000000 1 [holl "E-mail:foo@example.com"] }\n"
simple_expect "=1044"
send "1045 93 13 0 { } 1 { 8 00000000 1 [holl "E-mail:foo@example.com"] }\n"
simple_expect "=1045"
send "1046 93 8 0 { } 1 { 8 00000000 1 [holl "E-mail:foo@example.com"] }\n"
simple_expect "=1046"
send "1047 93 9 0 { } 1 { 8 00000000 1 [holl "E-mail:foo@example.com"] }\n"
simple_expect "=1047"
send "1048 93 10 0 { } 1 { 8 00000000 1 [holl "E-mail:foo@example.com"] }\n"
simple_expect "=1048"
send "1049 93 11 0 { } 1 { 8 00000000 1 [holl "E-mail:foo@example.com"] }\n"
simple_expect "=1049"
send "1050 93 12 0 { } 1 { 8 00000000 1 [holl "E-mail:foo@example.com"] }\n"
simple_expect "=1050"
send "1051 93 13 0 { } 1 { 8 00000000 1 [holl "E-mail:foo@example.com"] }\n"
simple_expect "=1051"
send "1052 93 8 0 { } 1 { 20000 00000000 1 0H }\n"
simple_expect "=1052"
send "1053 93 9 0 { } 1 { 20000 00000000 1 0H }\n"
simple_expect "=1053"
send "1054 93 10 0 { } 1 { 20000 00000000 1 0H }\n"
simple_expect "=1054"
send "1055 93 11 0 { } 1 { 20000 00000000 1 0H }\n"
simple_expect "=1055"
send "1056 93 12 0 { } 1 { 20000 00000000 1 0H }\n"
simple_expect "=1056"
send "1057 93 13 0 { } 1 { 20000 00000000 1 0H }\n"
simple_expect "=1057"
send "1058 93 8 0 { } 1 { 20000 00000000 1 0H }\n"
simple_expect "=1058"
send "1059 93 9 0 { } 1 { 20000 00000000 1 0H }\n"
simple_expect "=1059"
send "1060 93 10 0 { } 1 { 20000 00000000 1 0H }\n"
simple_expect "=1060"
send "1061 93 11 0 { } 1 { 20000 00000000 1 0H }\n"
simple_expect "=1061"
send "1062 93 12 0 { } 1 { 20000 00000000 1 0H }\n"
simple_expect "=1062"
send "1063 93 13 0 { } 1 { 20000 00000000 1 0H }\n"
simple_expect "=1063"
# Let person 6 attempt to remove the first, third and fifth aux-items.
talk_to client 1
enable
send "1064 93 8 1 { 1 } 0 { }\n"
simple_expect "%1064 49 0"
send "1065 93 9 1 { 1 } 0 { }\n"
simple_expect "%1065 49 0"
send "1066 93 10 1 { 1 } 0 { }\n"
simple_expect "%1066 49 0"
send "1067 93 11 1 { 1 } 0 { }\n"
simple_expect "%1067 49 0"
send "1068 93 12 1 { 1 } 0 { }\n"
simple_expect "%1068 49 0"
send "1069 93 13 1 { 1 } 0 { }\n"
simple_expect "%1069 49 0"
send "1070 93 8 1 { 3 } 0 { }\n"
simple_expect "=1070"
send "1071 93 9 1 { 3 } 0 { }\n"
simple_expect "%1071 49 0"
send "1072 93 10 1 { 3 } 0 { }\n"
simple_expect "%1072 49 0"
send "1073 93 11 1 { 3 } 0 { }\n"
simple_expect "%1073 49 0"
send "1074 93 12 1 { 3 } 0 { }\n"
simple_expect "=1074"
send "1075 93 13 1 { 3 } 0 { }\n"
simple_expect "=1075"
send "1076 93 8 1 { 5 } 0 { }\n"
simple_expect "%1076 49 0"
send "1077 93 9 1 { 5 } 0 { }\n"
simple_expect "%1077 49 0"
send "1078 93 10 1 { 5 } 0 { }\n"
simple_expect "%1078 49 0"
send "1079 93 11 1 { 5 } 0 { }\n"
simple_expect "%1079 49 0"
send "1080 93 12 1 { 5 } 0 { }\n"
simple_expect "%1080 49 0"
send "1081 93 13 1 { 5 } 0 { }\n"
simple_expect "%1081 49 0"
# Let person 7 attempt to remove the other aux-items.
talk_to client 2
enable
send "1082 93 8 1 { 2 } 0 { }\n"
simple_expect "%1082 49 0"
send "1083 93 9 1 { 2 } 0 { }\n"
simple_expect "%1083 49 0"
send "1084 93 10 1 { 2 } 0 { }\n"
simple_expect "%1084 49 0"
send "1085 93 11 1 { 2 } 0 { }\n"
simple_expect "%1085 49 0"
send "1086 93 12 1 { 2 } 0 { }\n"
simple_expect "%1086 49 0"
send "1087 93 13 1 { 2 } 0 { }\n"
simple_expect "%1087 49 0"
send "1088 93 8 1 { 4 } 0 { }\n"
simple_expect "%1088 49 0"
send "1089 93 9 1 { 4 } 0 { }\n"
simple_expect "%1089 49 0"
send "1090 93 10 1 { 4 } 0 { }\n"
simple_expect "=1090"
send "1091 93 11 1 { 4 } 0 { }\n"
simple_expect "%1091 49 0"
send "1092 93 12 1 { 4 } 0 { }\n"
setup_xfail "*-*-*" "Bug 334"
if {0} {
pass "Supervisor check correct"
simple_expect "=1092"
} else {
fail "Supervisor check correct"
simple_expect "%1092 49 0"
}
send "1093 93 13 1 { 4 } 0 { }\n"
simple_expect "%1093 49 0"
send "1094 93 8 1 { 6 } 0 { }\n"
simple_expect "%1094 49 0"
send "1095 93 9 1 { 6 } 0 { }\n"
simple_expect "%1095 49 0"
send "1096 93 10 1 { 6 } 0 { }\n"
simple_expect "%1096 49 0"
send "1097 93 11 1 { 6 } 0 { }\n"
simple_expect "%1097 49 0"
send "1098 93 12 1 { 6 } 0 { }\n"
simple_expect "%1098 49 0"
send "1099 93 13 1 { 6 } 0 { }\n"
simple_expect "%1099 49 0"
#
# Shut down
#
talk_to client 0
enable
send "1100 44 0\n"
simple_expect "=1100"
client_death 0
client_death 1
client_death 2
lyskomd_death
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment