| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| TEST_DIR="tests/p_abrt-cli" |
| source $TEST_DIR/_lib.sh |
| |
| t_Log "Running $0 - reporter-mantisbt test suite" |
| |
| |
| curl --silent -I http://bugs-test.centos.org/my_view_page.php|grep -q "HTTP/1.1 200 OK" |
| if [ "$?" -ne "0" ];then |
| t_Log "Mantis test instance doesn't seem reachable ... SKIP" |
| exit 0 |
| fi |
| |
| |
| [[ $centos_ver -lt 7 ]] && exit |
| |
| |
| rlJournalStart |
| rlPhaseStartSetup |
| LANG="" |
| export LANG |
| |
| TmpDir=$(mktemp -d) |
| cp -R $TEST_DIR/queries/* $TmpDir |
| cp -R $TEST_DIR/problem_dir $TmpDir |
| cp $TEST_DIR/_pyserve $TmpDir/pyserve |
| cp $TEST_DIR/_mantisbt.conf $TmpDir/mantisbt.conf |
| cp $TEST_DIR/_mantisbt_format.conf $TmpDir/mantisbt_format.conf |
| cp $TEST_DIR/_mantisbt_formatdup.conf $TmpDir/mantisbt_formatdup.conf |
| cp $TEST_DIR/_attachment_file $TmpDir/attachment_file |
| pushd $TmpDir |
| rlPhaseEnd |
| |
| rlPhaseStartTest "sanity" |
| rlRun "reporter-mantisbt --help &> null" |
| rlRun "reporter-mantisbt --help 2>&1 | grep 'Usage:'" |
| rlPhaseEnd |
| |
| |
| |
| rlPhaseStartTest "search by duphash" |
| ./pyserve \ |
| login_correct \ |
| search_two_issues &> server_log & |
| |
| sleep 1 |
| rlRun "reporter-mantisbt -vvv -h bbfe66399cc9cb8ba647414e33c5d1e4ad82b511 -c mantisbt.conf &> client_log" |
| kill %1 |
| |
| rlAssertGrep "<ns3:mc_login><ns3:username xsi:type=\"ns2:string\">test</ns3:username>" server_log |
| rlAssertGrep "<ns3:password xsi:type=\"ns2:string\">password</ns3:password></ns3:mc_login>" server_log |
| rlAssertGrep "<ns3:mc_filter_search_issues>" server_log |
| rlAssertGrep "<ns3:field xsi:type=\"ns3:ObjectRef\"><ns3:name xsi:type=\"ns2:string\">abrt_hash</ns3:name>" server_log |
| rlAssertGrep "bbfe66399cc9cb8ba647414e33c5d1e4ad82b511</ns3:item>" server_log |
| |
| rlAssertGrep "<SOAP-ENV:Body><ns1:mc_loginResponse>" client_log |
| rlAssertGrep "<id xsi:type=\"xsd:integer\">2</id>" client_log |
| rlAssertGrep "<name xsi:type=\"xsd:string\">test</name>" client_log |
| |
| rlAssertGrep "Looking for similar problems in CentOS Bug Tracker" client_log |
| rlAssertGrep "<item xsi:type=\"ns1:IssueData\"><id xsi:type=\"xsd:integer\">99</id>" client_log |
| rlAssertGrep "99" client_log |
| |
| |
| rlAssertNotGrep "Status: new open http://localhost:12345/view.php?id=99" client_log |
| rlAssertNotGrep "<int>323795</int>" client_log |
| |
| rm -f problem_dir/reported_to |
| rlPhaseEnd |
| |
| |
| rlPhaseStartTest "attach files to issue (issue ID is specified)" |
| ./pyserve \ |
| $QUERIES_DIR/login_correct \ |
| $QUERIES_DIR/project_get_id_from_name \ |
| $QUERIES_DIR/attachment \ |
| &> server_log & |
| sleep 1 |
| rlRun "reporter-mantisbt -vvv -c mantisbt.conf -F mantisbt_format.conf \ |
| -d problem_dir -t1 attachment_file &> client_log" |
| kill %1 |
| |
| |
| rlAssertGrep "<ns3:mc_login><ns3:username xsi:type=\"ns2:string\">test</ns3:username>" server_log |
| |
| rlAssertGrep "<ns3:mc_issue_attachment_add>" server_log |
| rlAssertGrep "<ns3:issue_id xsi:type=\"ns2:integer\">1</ns3:issue_id>" server_log |
| rlAssertGrep "<ns3:name xsi:type=\"ns2:string\">attachment_file</ns3:name>" server_log |
| rlAssertGrep "<ns3:content xsi:type=\"SOAP-ENC:base64\">U1NCaGJTQmhkSFJoWTJobFpDQTZLUW89Cg==</ns3:content>" server_log |
| |
| |
| rlAssertGrep "<SOAP-ENV:Body><ns1:mc_loginResponse>" client_log |
| rlAssertGrep "<id xsi:type=\"xsd:integer\">2</id>" client_log |
| rlAssertGrep "name xsi:type=\"xsd:string\">test</name>" client_log |
| |
| rlAssertGrep "Attaching file 'attachment_file' to issue 1" client_log |
| rlAssertGrep "<return xsi:type=\"xsd:integer\">4</return></ns1:mc_issue_attachment_addResponse>" client_log |
| |
| |
| rlAssertNotGrep "Status: new open http://localhost:12345/view.php?id=99" client_log |
| rlAssertNotGrep "<int>323795</int>" client_log |
| |
| rm -f problem_dir/reported_to |
| rlPhaseEnd |
| |
| |
| |
| rlPhaseStartTest "attach files to issue (issue ID is not specified)" |
| ./pyserve \ |
| $QUERIES_DIR/login_correct \ |
| $QUERIES_DIR/project_get_id_from_name \ |
| $QUERIES_DIR/attachment \ |
| &> server_log & |
| |
| rlRun "echo \"CentOS Bug Tracker: URL=http://localhost:12345/mantisbt/view.php?id=1\" > problem_dir/reported_to" |
| |
| sleep 1 |
| rlRun "reporter-mantisbt -vvv -c mantisbt.conf -F mantisbt_format.conf -d problem_dir -t attachment_file &> client_log" |
| kill %1 |
| |
| |
| rlAssertGrep "<ns3:mc_issue_attachment_add>" server_log |
| rlAssertGrep "<ns3:issue_id xsi:type=\"ns2:integer\">1</ns3:issue_id>" server_log |
| rlAssertGrep "<ns3:name xsi:type=\"ns2:string\">attachment_file</ns3:name>" server_log |
| |
| |
| rlAssertGrep "<SOAP-ENV:Body><ns1:mc_loginResponse>" client_log |
| rlAssertGrep "<id xsi:type=\"xsd:integer\">2</id>" client_log |
| rlAssertGrep "name xsi:type=\"xsd:string\">test</name>" client_log |
| |
| rlAssertGrep "Attaching file 'attachment_file' to issue 1" client_log |
| rlAssertGrep "<return xsi:type=\"xsd:integer\">4</return></ns1:mc_issue_attachment_addResponse>" client_log |
| |
| |
| rlAssertNotGrep "Status: new open http://localhost:12345/view.php?id=99" client_log |
| rlAssertNotGrep "<int>323795</int>" client_log |
| |
| rm -f problem_dir/reported_to |
| rlPhaseEnd |
| |
| |
| rlPhaseStartTest "force reporting" |
| ./pyserve \ |
| $QUERIES_DIR/login_correct \ |
| $QUERIES_DIR/project_get_id_from_name \ |
| $QUERIES_DIR/search_two_issues \ |
| $QUERIES_DIR/search_no_issue \ |
| $QUERIES_DIR/get_custom_fields \ |
| $QUERIES_DIR/create \ |
| $QUERIES_DIR/attachment \ |
| $QUERIES_DIR/attachment \ |
| &> server_log & |
| |
| |
| rlRun "echo \"CentOS Bug Tracker: URL=http://localhost:12345/mantisbt/view.php?id=1\" > problem_dir/reported_to" |
| |
| sleep 1 |
| rlRun "reporter-mantisbt -f -vvv -c mantisbt.conf -F mantisbt_format.conf -A mantisbt_formatdup.conf -d problem_dir >client_log 2>&1 " |
| kill %1 |
| |
| |
| rlAssertGrep "<ns1:Body><ns3:mc_login><ns3:username xsi:type=\"ns2:string\">test</ns3:username>" server_log |
| rlAssertGrep "<ns3:mc_filter_search_issues>" server_log |
| rlAssertGrep "<ns3:mc_issue_add>" server_log |
| rlAssertGrep "<ns3:name xsi:type=\"ns2:string\">proj</ns3:name>" server_log |
| rlAssertGrep "<ns3:view_state xsi:type=\"ns3:ObjectRef\"><ns3:name xsi:type=\"ns2:string\">public</ns3:name></ns3:view_state>" server_log |
| rlAssertGrep "<ns3:os_build xsi:type=\"ns2:string\">666</ns3:os_build>" server_log |
| rlAssertGrep "<ns3:summary xsi:type=\"ns2:string\">\[abrt\] : rxvt_term::selection_delimit_word(): Process /usr/bin/urxvtd was killed by signal 11 (SIGSEGV)</ns3:summary>" server_log |
| rlAssertGrep "<ns3:mc_issue_attachment_add>" server_log |
| rlAssertGrep "<ns3:name xsi:type=\"ns2:string\">backtrace</ns3:name>" server_log |
| |
| rlAssertGrep "<ns3:issue_id xsi:type=\"ns2:integer\">7</ns3:issue_id>" server_log |
| rlAssertGrep "<ns3:name xsi:type=\"ns2:string\">backtrace</ns3:name>" server_log |
| |
| |
| rlAssertGrep "<SOAP-ENV:Body><ns1:mc_loginResponse>" client_log |
| rlAssertGrep "<id xsi:type=\"xsd:integer\">2</id>" client_log |
| rlAssertGrep "name xsi:type=\"xsd:string\">test</name>" client_log |
| |
| rlAssertGrep "Checking for duplicates" client_log |
| rlAssertGrep "CentOS Bug Tracker has 2 reports with duphash 'bbfe66399cc9cb8ba647414e33c5d1e4ad82b511' including cross-version ones" client_log |
| rlAssertGrep "<return SOAP-ENC:arrayType=\"ns1:IssueData\[2\]\" xsi:type=\"SOAP-ENC:Array\">" client_log |
| rlAssertGrep "Potential duplicate: issue 99" client_log |
| rlAssertGrep "CentOS Bug Tracker has 0 reports with duphash 'bbfe66399cc9cb8ba647414e33c5d1e4ad82b511'" client_log |
| rlAssertGrep "<return SOAP-ENC:arrayType=\"ns1:IssueData\[0\]\" xsi:type=\"SOAP-ENC:Array\">" client_log |
| |
| rlAssertGrep "Creating a new issue" client_log |
| rlAssertGrep "<ns1:mc_issue_addResponse><return xsi:type=\"xsd:integer\">7</return>" client_log |
| |
| |
| rlAssertNotGrep "<int>323795</int>" client_log |
| |
| rm -f problem_dir/reported_to |
| rlPhaseEnd |
| |
| |
| rlPhaseStartTest "create an issue (only potential duplicate issues exist)" |
| ./pyserve \ |
| $QUERIES_DIR/login_correct \ |
| $QUERIES_DIR/project_get_id_from_name \ |
| $QUERIES_DIR/search_two_issues \ |
| $QUERIES_DIR/search_no_issue \ |
| $QUERIES_DIR/get_custom_fields \ |
| $QUERIES_DIR/create \ |
| $QUERIES_DIR/attachment \ |
| $QUERIES_DIR/attachment \ |
| &> server_log & |
| |
| |
| rlRun "echo \"CentOS Bug Tracker: URL=http://localhost:12345/mantisbt/view.php?id=1\" > problem_dir/reported_to" |
| |
| sleep 1 |
| rlRun "reporter-mantisbt -f -vvv -c mantisbt.conf -F mantisbt_format.conf -A mantisbt_formatdup.conf -d problem_dir >client_log 2>&1 " |
| kill %1 |
| |
| |
| rlAssertGrep "<ns1:Body><ns3:mc_login><ns3:username xsi:type=\"ns2:string\">test</ns3:username>" server_log |
| rlAssertGrep "<ns3:mc_filter_search_issues>" server_log |
| rlAssertGrep "<ns3:mc_issue_add>" server_log |
| rlAssertGrep "<ns3:name xsi:type=\"ns2:string\">proj</ns3:name>" server_log |
| rlAssertGrep "<ns3:view_state xsi:type=\"ns3:ObjectRef\"><ns3:name xsi:type=\"ns2:string\">public</ns3:name></ns3:view_state>" server_log |
| rlAssertGrep "<ns3:os_build xsi:type=\"ns2:string\">666</ns3:os_build>" server_log |
| rlAssertGrep "<ns3:summary xsi:type=\"ns2:string\">\[abrt\] : rxvt_term::selection_delimit_word(): Process /usr/bin/urxvtd was killed by signal 11 (SIGSEGV)</ns3:summary>" server_log |
| rlAssertGrep "<ns3:mc_issue_attachment_add>" server_log |
| rlAssertGrep "<ns3:name xsi:type=\"ns2:string\">backtrace</ns3:name>" server_log |
| |
| rlAssertGrep "<ns3:issue_id xsi:type=\"ns2:integer\">7</ns3:issue_id>" server_log |
| rlAssertGrep "<ns3:name xsi:type=\"ns2:string\">backtrace</ns3:name>" server_log |
| |
| |
| rlAssertGrep "<SOAP-ENV:Body><ns1:mc_loginResponse>" client_log |
| rlAssertGrep "<id xsi:type=\"xsd:integer\">2</id>" client_log |
| rlAssertGrep "name xsi:type=\"xsd:string\">test</name>" client_log |
| |
| rlAssertGrep "Checking for duplicates" client_log |
| rlAssertGrep "CentOS Bug Tracker has 2 reports with duphash 'bbfe66399cc9cb8ba647414e33c5d1e4ad82b511' including cross-version ones" client_log |
| rlAssertGrep "<return SOAP-ENC:arrayType=\"ns1:IssueData\[2\]\" xsi:type=\"SOAP-ENC:Array\">" client_log |
| rlAssertGrep "Potential duplicate: issue 99" client_log |
| rlAssertGrep "CentOS Bug Tracker has 0 reports with duphash 'bbfe66399cc9cb8ba647414e33c5d1e4ad82b511'" client_log |
| rlAssertGrep "<return SOAP-ENC:arrayType=\"ns1:IssueData\[0\]\" xsi:type=\"SOAP-ENC:Array\">" client_log |
| |
| rlAssertGrep "Creating a new issue" client_log |
| rlAssertGrep "<ns1:mc_issue_addResponse><return xsi:type=\"xsd:integer\">7</return>" client_log |
| |
| rlAssertGrep "Status: new http://localhost:12345/view.php?id=7" client_log |
| |
| |
| rlAssertNotGrep "<int>323795</int>" client_log |
| |
| rm -f problem_dir/reported_to |
| rlPhaseEnd |
| |
| |
| rlPhaseStartTest "create an issue (no potential duplicate issues exist)" |
| ./pyserve \ |
| $QUERIES_DIR/login_correct \ |
| $QUERIES_DIR/project_get_id_from_name \ |
| $QUERIES_DIR/search_no_issue \ |
| $QUERIES_DIR/get_custom_fields \ |
| $QUERIES_DIR/create \ |
| $QUERIES_DIR/attachment \ |
| $QUERIES_DIR/attachment \ |
| &> server_log & |
| |
| sleep 1 |
| rlRun "reporter-mantisbt -vvv -c mantisbt.conf -F mantisbt_format.conf -d problem_dir &> client_log" |
| kill %1 |
| |
| |
| rlAssertGrep "<ns3:mc_login>" server_log |
| rlAssertGrep "<ns3:mc_filter_search_issues>" server_log |
| rlAssertGrep "<ns3:mc_issue_add>" server_log |
| rlAssertGrep "<ns3:mc_issue_attachment_add>" server_log |
| |
| |
| rlAssertGrep "<SOAP-ENV:Body><ns1:mc_loginResponse>" client_log |
| rlAssertGrep "<id xsi:type=\"xsd:integer\">2</id>" client_log |
| rlAssertGrep "name xsi:type=\"xsd:string\">test</name>" client_log |
| |
| rlAssertGrep "Checking for duplicates" client_log |
| rlAssertGrep "CentOS Bug Tracker has 0 reports with duphash 'bbfe66399cc9cb8ba647414e33c5d1e4ad82b511' including cross-version ones" client_log |
| rlAssertGrep "<return SOAP-ENC:arrayType=\"ns1:IssueData\[0\]\" xsi:type=\"SOAP-ENC:Array\">" client_log |
| |
| |
| rlAssertNotGrep "CentOS Bug Tracker has 2 reports" client_log |
| |
| rlAssertGrep "Creating a new issue" client_log |
| rlAssertGrep "<ns1:mc_issue_addResponse><return xsi:type=\"xsd:integer\">7</return>" client_log |
| |
| rlAssertGrep "Status: new http://localhost:12345/view.php?id=7" client_log |
| rlAssertNotGrep "<int>323795</int>" client_log |
| |
| rm -f problem_dir/reported_to |
| rlPhaseEnd |
| |
| |
| rlPhaseStartTest "duplicate issue exist (comment doesn't exist)" |
| ./pyserve \ |
| $QUERIES_DIR/login_correct \ |
| $QUERIES_DIR/project_get_id_from_name \ |
| $QUERIES_DIR/search_two_issues \ |
| $QUERIES_DIR/search_one_issue \ |
| $QUERIES_DIR/get_issue \ |
| &> server_log & |
| |
| rlRun "rm -f problem_dir/comment" |
| |
| sleep 1 |
| rlRun "reporter-mantisbt -vvv -c mantisbt.conf -F mantisbt_format.conf -A mantisbt_formatdup.conf -d problem_dir &> client_log" |
| kill %1 |
| |
| |
| rlAssertGrep "<ns3:mc_login>" server_log |
| rlAssertGrep "<ns3:mc_filter_search_issues>" server_log |
| rlAssertGrep "<ns3:mc_issue_get>" server_log |
| rlAssertGrep "<ns3:issue_id xsi:type=\"ns2:integer\">99</ns3:issue_id></ns3:mc_issue_get>" server_log |
| |
| |
| rlAssertGrep "<SOAP-ENV:Body><ns1:mc_loginResponse>" client_log |
| rlAssertGrep "<id xsi:type=\"xsd:integer\">2</id>" client_log |
| rlAssertGrep "name xsi:type=\"xsd:string\">test</name>" client_log |
| |
| rlAssertGrep "Checking for duplicates" client_log |
| rlAssertGrep "CentOS Bug Tracker has 2 reports with duphash 'bbfe66399cc9cb8ba647414e33c5d1e4ad82b511' including cross-version ones" client_log |
| rlAssertGrep "<return SOAP-ENC:arrayType=\"ns1:IssueData\[2\]\" xsi:type=\"SOAP-ENC:Array\">" client_log |
| rlAssertGrep "CentOS Bug Tracker has 1 reports with duphash 'bbfe66399cc9cb8ba647414e33c5d1e4ad82b511'" client_log |
| rlAssertNotGrep "<return SOAP-ENC:arrayType=\"ns1:IssueData\[0\]\" xsi:type=\"SOAP-ENC:Array\">" client_log |
| |
| rlAssertGrep "<ns1:mc_issue_getResponse><return xsi:type=\"ns1:IssueData\"><id xsi:type=\"xsd:integer\">99</id>" client_log |
| rlAssertGrep "<name xsi:type=\"xsd:string\">new</name></status>" client_log |
| rlAssertGrep "Bug is already reported: 99" client_log |
| |
| rlAssertGrep "Status: new open http://localhost:12345/view.php?id=99" client_log |
| |
| |
| rlAssertNotGrep "<int>323795</int>" client_log |
| |
| rm -f problem_dir/reported_to |
| rlPhaseEnd |
| |
| |
| rlPhaseStartTest "duplicate issue exist (comment doesn't exist)" |
| ./pyserve \ |
| $QUERIES_DIR/login_correct \ |
| $QUERIES_DIR/project_get_id_from_name \ |
| $QUERIES_DIR/search_two_issues \ |
| $QUERIES_DIR/search_one_issue \ |
| $QUERIES_DIR/get_issue_closed_as_duplicate \ |
| $QUERIES_DIR/get_issue \ |
| &> server_log & |
| |
| sleep 1 |
| rlRun "reporter-mantisbt -vvv -c mantisbt.conf -F mantisbt_format.conf -A mantisbt_formatdup.conf -d problem_dir &> client_log" |
| kill %1 |
| |
| |
| rlAssertGrep "<ns3:mc_login>" server_log |
| rlAssertGrep "<ns3:mc_filter_search_issues>" server_log |
| rlAssertGrep "<ns3:mc_issue_get>" server_log |
| rlAssertGrep "<ns3:issue_id xsi:type=\"ns2:integer\">99</ns3:issue_id></ns3:mc_issue_get>" server_log |
| |
| |
| rlAssertGrep "<SOAP-ENV:Body><ns1:mc_loginResponse>" client_log |
| rlAssertGrep "<id xsi:type=\"xsd:integer\">2</id>" client_log |
| rlAssertGrep "name xsi:type=\"xsd:string\">test</name>" client_log |
| |
| rlAssertGrep "Checking for duplicates" client_log |
| rlAssertGrep "CentOS Bug Tracker has 2 reports with duphash 'bbfe66399cc9cb8ba647414e33c5d1e4ad82b511' including cross-version ones" client_log |
| rlAssertGrep "<return SOAP-ENC:arrayType=\"ns1:IssueData\[2\]\" xsi:type=\"SOAP-ENC:Array\">" client_log |
| rlAssertGrep "CentOS Bug Tracker has 1 reports with duphash 'bbfe66399cc9cb8ba647414e33c5d1e4ad82b511'" client_log |
| |
| |
| rlAssertNotGrep "<return SOAP-ENC:arrayType=\"ns1:IssueData\[0\]\" xsi:type=\"SOAP-ENC:Array\">" client_log |
| |
| rlAssertGrep "<ns1:mc_issue_getResponse><return xsi:type=\"ns1:IssueData\"><id xsi:type=\"xsd:integer\">99</id>" client_log |
| rlAssertGrep "<name xsi:type=\"xsd:string\">new</name></status>" client_log |
| rlAssertGrep "<name xsi:type=\"xsd:string\">duplicate</name></resolution>" client_log |
| rlAssertGrep "Bug is already reported: 99" client_log |
| rlAssertGrep "Issue 99 is a duplicate, using parent issue 101" client_log |
| |
| rlAssertGrep "Status: new open http://localhost:12345/view.php?id=101" client_log |
| |
| rlAssertNotGrep "Status: new open http://localhost:12345/view.php?id=99" client_log |
| rlAssertNotGrep "<int>323795</int>" client_log |
| |
| rm -f problem_dir/reported_to |
| rm -f problem_dir/comment |
| |
| rlPhaseEnd |
| |
| |
| rlPhaseStartTest "duplicate issue exist (comment file exists, isn't duplicate, attach backtrace)" |
| ./pyserve \ |
| $QUERIES_DIR/login_correct \ |
| $QUERIES_DIR/project_get_id_from_name \ |
| $QUERIES_DIR/search_two_issues \ |
| $QUERIES_DIR/search_one_issue \ |
| $QUERIES_DIR/get_issue \ |
| $QUERIES_DIR/add_note \ |
| $QUERIES_DIR/attachment \ |
| &> server_log & |
| |
| |
| rlRun "echo \"i am comment\" > problem_dir/comment" |
| |
| sleep 1 |
| rlRun "reporter-mantisbt -vvv -c mantisbt.conf -F mantisbt_format.conf -A mantisbt_formatdup.conf -d problem_dir &> client_log" |
| kill %1 |
| |
| |
| rlAssertGrep "<ns3:mc_login>" server_log |
| rlAssertGrep "<ns3:mc_filter_search_issues>" server_log |
| rlAssertGrep "<ns3:mc_issue_get>" server_log |
| rlAssertGrep "<ns3:issue_id xsi:type=\"ns2:integer\">99</ns3:issue_id></ns3:mc_issue_get>" server_log |
| rlAssertGrep "<ns3:mc_issue_note_add>" server_log |
| rlAssertGrep "<ns3:mc_issue_attachment_add>" server_log |
| |
| |
| rlAssertGrep "<SOAP-ENV:Body><ns1:mc_loginResponse>" client_log |
| rlAssertGrep "<id xsi:type=\"xsd:integer\">2</id>" client_log |
| rlAssertGrep "name xsi:type=\"xsd:string\">test</name>" client_log |
| |
| rlAssertGrep "Checking for duplicates" client_log |
| rlAssertGrep "CentOS Bug Tracker has 2 reports with duphash 'bbfe66399cc9cb8ba647414e33c5d1e4ad82b511' including cross-version ones" client_log |
| rlAssertGrep "<return SOAP-ENC:arrayType=\"ns1:IssueData\[2\]\" xsi:type=\"SOAP-ENC:Array\">" client_log |
| rlAssertGrep "CentOS Bug Tracker has 1 reports with duphash 'bbfe66399cc9cb8ba647414e33c5d1e4ad82b511'" client_log |
| rlAssertNotGrep "<return SOAP-ENC:arrayType=\"ns1:IssueData\[0\]\" xsi:type=\"SOAP-ENC:Array\">" client_log |
| |
| rlAssertGrep "<ns1:mc_issue_getResponse><return xsi:type=\"ns1:IssueData\"><id xsi:type=\"xsd:integer\">99</id>" client_log |
| rlAssertGrep "<name xsi:type=\"xsd:string\">new</name></status>" client_log |
| rlAssertGrep "Bug is already reported: 99" client_log |
| rlAssertGrep "Adding new comment to issue 99" client_log |
| rlAssertGrep "Attaching better backtrace" client_log |
| rlAssertGrep "<ns1:mc_issue_note_addResponse><return xsi:type=\"xsd:integer\">5</return></ns1:mc_issue_note_addResponse>" client_log |
| rlAssertGrep "<return xsi:type=\"xsd:integer\">4</return></ns1:mc_issue_attachment_addResponse>" client_log |
| |
| rlAssertGrep "Status: new open http://localhost:12345/view.php?id=99" client_log |
| |
| |
| rlAssertNotGrep "<int>323795</int>" client_log |
| |
| rm -f problem_dir/reported_to |
| rm -f problem_dir/comment |
| rlPhaseEnd |
| |
| |
| rlPhaseStartTest "duplicate issue exist (comment file exists, is duplicate)" |
| ./pyserve \ |
| $QUERIES_DIR/login_correct \ |
| $QUERIES_DIR/project_get_id_from_name \ |
| $QUERIES_DIR/search_two_issues \ |
| $QUERIES_DIR/search_one_issue \ |
| $QUERIES_DIR/get_issue_dup_comment_rating_1 \ |
| &> server_log & |
| |
| |
| rlRun "echo \"i am comment\" > problem_dir/comment" |
| |
| sleep 1 |
| rlRun "reporter-mantisbt -vvv -c mantisbt.conf -F mantisbt_format.conf -A mantisbt_formatdup.conf -d problem_dir &> client_log" |
| kill %1 |
| |
| |
| rlAssertGrep "<ns3:mc_login>" server_log |
| rlAssertGrep "<ns3:mc_filter_search_issues>" server_log |
| rlAssertGrep "<ns3:mc_issue_get>" server_log |
| rlAssertGrep "<ns3:issue_id xsi:type=\"ns2:integer\">99</ns3:issue_id></ns3:mc_issue_get>" server_log |
| |
| |
| rlAssertGrep "<SOAP-ENV:Body><ns1:mc_loginResponse>" client_log |
| rlAssertGrep "<id xsi:type=\"xsd:integer\">2</id>" client_log |
| rlAssertGrep "name xsi:type=\"xsd:string\">test</name>" client_log |
| |
| rlAssertGrep "Checking for duplicates" client_log |
| rlAssertGrep "CentOS Bug Tracker has 2 reports with duphash 'bbfe66399cc9cb8ba647414e33c5d1e4ad82b511' including cross-version ones" client_log |
| rlAssertGrep "<return SOAP-ENC:arrayType=\"ns1:IssueData\[2\]\" xsi:type=\"SOAP-ENC:Array\">" client_log |
| rlAssertGrep "CentOS Bug Tracker has 1 reports with duphash 'bbfe66399cc9cb8ba647414e33c5d1e4ad82b511'" client_log |
| |
| |
| rlAssertNotGrep "<return SOAP-ENC:arrayType=\"ns1:IssueData\[0\]\" xsi:type=\"SOAP-ENC:Array\">" client_log |
| |
| rlAssertGrep "<ns1:mc_issue_getResponse><return xsi:type=\"ns1:IssueData\"><id xsi:type=\"xsd:integer\">99</id>" client_log |
| rlAssertGrep "<name xsi:type=\"xsd:string\">new</name></status>" client_log |
| rlAssertGrep "Bug is already reported: 99" client_log |
| rlAssertGrep "Found the same comment in the issue history, not adding a new one" client_log |
| |
| |
| rlAssertNotGrep "<ns1:mc_issue_note_addResponse><return xsi:type=\"xsd:integer\">5</return></ns1:mc_issue_note_addResponse>" client_log |
| rlAssertNotGrep "<return xsi:type=\"xsd:integer\">4</return></ns1:mc_issue_attachment_addResponse>" client_log |
| |
| rlAssertGrep "Status: new open http://localhost:12345/view.php?id=99" client_log |
| rlAssertNotGrep "<int>323795</int>" client_log |
| |
| rm -f problem_dir/reported_to |
| rm -f problem_dir/comment |
| rlPhaseEnd |
| |
| rlPhaseStartTest "duplicate issue exist (comment file exists, isn't duplicate, the same backtrace rating)" |
| ./pyserve \ |
| $QUERIES_DIR/login_correct \ |
| $QUERIES_DIR/project_get_id_from_name \ |
| $QUERIES_DIR/search_two_issues \ |
| $QUERIES_DIR/search_one_issue \ |
| $QUERIES_DIR/get_issue_comment_rating_1 \ |
| $QUERIES_DIR/add_note \ |
| &> server_log & |
| |
| |
| rlRun "echo \"i am comment\" > problem_dir/comment" |
| |
| sleep 1 |
| rlRun "reporter-mantisbt -vvv -c mantisbt.conf -F mantisbt_format.conf -A mantisbt_formatdup.conf -d problem_dir &> client_log" |
| kill %1 |
| |
| |
| rlAssertGrep "<ns3:mc_login>" server_log |
| rlAssertGrep "<ns3:mc_filter_search_issues>" server_log |
| rlAssertGrep "<ns3:mc_issue_get>" server_log |
| rlAssertGrep "<ns3:issue_id xsi:type=\"ns2:integer\">99</ns3:issue_id></ns3:mc_issue_get>" server_log |
| rlAssertGrep "<ns3:mc_issue_note_add>" server_log |
| |
| |
| rlAssertNotGrep "<ns3:mc_issue_attachment_add>" server_log |
| |
| |
| rlAssertGrep "<SOAP-ENV:Body><ns1:mc_loginResponse>" client_log |
| rlAssertGrep "<id xsi:type=\"xsd:integer\">2</id>" client_log |
| rlAssertGrep "name xsi:type=\"xsd:string\">test</name>" client_log |
| |
| rlAssertGrep "Checking for duplicates" client_log |
| rlAssertGrep "CentOS Bug Tracker has 2 reports with duphash 'bbfe66399cc9cb8ba647414e33c5d1e4ad82b511' including cross-version ones" client_log |
| rlAssertGrep "<return SOAP-ENC:arrayType=\"ns1:IssueData\[2\]\" xsi:type=\"SOAP-ENC:Array\">" client_log |
| rlAssertGrep "CentOS Bug Tracker has 1 reports with duphash 'bbfe66399cc9cb8ba647414e33c5d1e4ad82b511'" client_log |
| rlAssertGrep "Status: new open http://localhost:12345/view.php?id=99" client_log |
| |
| |
| rlAssertGrep "<ns1:mc_issue_getResponse><return xsi:type=\"ns1:IssueData\"><id xsi:type=\"xsd:integer\">99</id>" client_log |
| rlAssertGrep "<name xsi:type=\"xsd:string\">new</name></status>" client_log |
| rlAssertGrep "Bug is already reported: 99" client_log |
| rlAssertGrep "<ns1:mc_issue_note_addResponse><return xsi:type=\"xsd:integer\">5</return></ns1:mc_issue_note_addResponse>" client_log |
| rlAssertGrep "Adding new comment to issue 99" client_log |
| |
| |
| rlAssertNotGrep "<return SOAP-ENC:arrayType=\"ns1:IssueData\[0\]\" xsi:type=\"SOAP-ENC:Array\">" client_log |
| rlAssertNotGrep "Attaching better backtrace" client_log |
| rlAsserNottGrep "Found the same comment in the issue history, not adding a new one" client_log |
| rlAssertNotGrep "<return xsi:type=\"xsd:integer\">4</return></ns1:mc_issue_attachment_addResponse>" client_log |
| rlAssertNotGrep "<int>323795</int>" client_log |
| |
| |
| rm -f problem_dir/reported_to |
| rm -f problem_dir/comment |
| rlPhaseEnd |
| |
| rlPhaseStartTest "duplicate issue exist (comment file exists, isn't duplicate, better backtrace rating)" |
| ./pyserve \ |
| $QUERIES_DIR/login_correct \ |
| $QUERIES_DIR/project_get_id_from_name \ |
| $QUERIES_DIR/search_two_issues \ |
| $QUERIES_DIR/search_one_issue \ |
| $QUERIES_DIR/get_issue_comment_rating_1 \ |
| $QUERIES_DIR/add_note \ |
| $QUERIES_DIR/attachment \ |
| &> server_log & |
| |
| |
| rlRun "echo \"i am comment\" > problem_dir/comment" |
| rlRun "echo \"5\" > problem_dir/backtrace_rating" |
| |
| sleep 1 |
| rlRun "reporter-mantisbt -vvv -c mantisbt.conf -F mantisbt_format.conf -A mantisbt_formatdup.conf -d problem_dir &> client_log" |
| kill %1 |
| |
| |
| rlAssertGrep "<ns3:mc_login>" server_log |
| rlAssertGrep "<ns3:mc_filter_search_issues>" server_log |
| rlAssertGrep "<ns3:mc_issue_get>" server_log |
| rlAssertGrep "<ns3:issue_id xsi:type=\"ns2:integer\">99</ns3:issue_id></ns3:mc_issue_get>" server_log |
| rlAssertGrep "<ns3:mc_issue_note_add>" server_log |
| rlAssertGrep "<ns3:mc_issue_attachment_add>" server_log |
| |
| |
| rlAssertGrep "<SOAP-ENV:Body><ns1:mc_loginResponse>" client_log |
| rlAssertGrep "<id xsi:type=\"xsd:integer\">2</id>" client_log |
| rlAssertGrep "name xsi:type=\"xsd:string\">test</name>" client_log |
| |
| rlAssertGrep "Checking for duplicates" client_log |
| rlAssertGrep "CentOS Bug Tracker has 2 reports with duphash 'bbfe66399cc9cb8ba647414e33c5d1e4ad82b511' including cross-version ones" client_log |
| rlAssertGrep "<return SOAP-ENC:arrayType=\"ns1:IssueData\[2\]\" xsi:type=\"SOAP-ENC:Array\">" client_log |
| |
| |
| rlAssertGrep "CentOS Bug Tracker has 1 reports with duphash 'bbfe66399cc9cb8ba647414e33c5d1e4ad82b511'" client_log |
| rlAssertNotGrep "<return SOAP-ENC:arrayType=\"ns1:IssueData\[0\]\" xsi:type=\"SOAP-ENC:Array\">" client_log |
| |
| rlAssertGrep "<ns1:mc_issue_getResponse><return xsi:type=\"ns1:IssueData\"><id xsi:type=\"xsd:integer\">99</id>" client_log |
| rlAssertGrep "<name xsi:type=\"xsd:string\">new</name></status>" client_log |
| rlAssertGrep "Bug is already reported: 99" client_log |
| rlAssertGrep "<ns1:mc_issue_note_addResponse><return xsi:type=\"xsd:integer\">5</return></ns1:mc_issue_note_addResponse>" client_log |
| rlAssertGrep "Adding new comment to issue 99" client_log |
| rlAssertGrep "Attaching better backtrace" client_log |
| rlAssertGrep "<return xsi:type=\"xsd:integer\">4</return></ns1:mc_issue_attachment_addResponse>" client_log |
| |
| rlAssertGrep "Status: new open http://localhost:12345/view.php?id=99" client_log |
| |
| |
| rlAsserNottGrep "Found the same comment in the issue history, not adding a new one" client_log |
| rlAssertNotGrep "<int>323795</int>" client_log |
| |
| rm -f problem_dir/reported_to |
| rm -f problem_dir/comment |
| rlRun "echo \"1\" > problem_dir/backtrace_rating" |
| rlPhaseEnd |
| |
| rlPhaseStartCleanup |
| rlBundleLogs abrt server* client* |
| popd |
| rm -rf $TmpDir |
| rlPhaseEnd |
| rlJournalPrintText |
| rlJournalEnd |