Beispiel #1
0
    mx1_cassblob_ip, mx1_search_cassandraBlobPort, uuid, AES_mode1)

body_check_flag1 = messagebody1.count(
    'Mail System Error - Returned Mail with Subject')
basic_class.mylogger_record.debug('body_check_flag1= ' + str(body_check_flag1))

if encrypted_flag == 1 and body_check_flag1 >= 1:
    result_lists.append('fetch messagebody from cassandra success')
else:
    result_lists.append('fetch messagebody from cassandra fail')

basic_class.mylogger_record.info('step3:fetch message body from IMAP')
myimap = imap_operations.IMAP_Ops(mx1_imapserv_host1_ip,
                                  mx1_imapserv_host1_imap4Port)
myimap.imap_login('testuser1', 'testuser1')
myimap.imap_select()
messagebody2 = myimap.imap_fetch('1', 'rfc822')
myimap.imap_logout()

body_check_flag2 = messagebody2[1].count(
    'Mail System Error - Returned Mail with Subject')
basic_class.mylogger_record.debug('body_check_flag2 = ' +
                                  str(body_check_flag2))

if body_check_flag2 >= 1:
    result_lists.append('fetch messagebody from IMAP success')
else:
    result_lists.append('fetch messagebody from IMAP fail')

basic_function.summary(result_lists)
Beispiel #2
0
    mypop3.pop_retr(2)
    mypop3.pop_retr(2)
    mypop3.pop_retr(2)
    mypop3.pop_quit()

basic_class.mylogger_record.info('fetching popserv.stat ...')
time.sleep(50)
basic_class.mylogger_record.info('check and analyze popserv.stat file ...')
popserv_stat_content = remote_operations.remote_operation(
    mx2_host1_ip, root_account, root_passwd,
    'su - {0} -c "cat log/popserv.stat|grep StatMSSRetrMsg"'.format(
        mx_account), 0)
result_lists = stat_statistics.stat_statistic(popserv_stat_content, '[200]',
                                              'StatMSSRetrMsg', 25)
basic_function.summary(
    result_lists,
    'MX-12765:StatMSSRetrMsg_200_pop_retr_same_normal_message_for_5_times')

#2#########################################################################################################################
basic_class.mylogger_recordnf.title(
    'running testcase:MX-12766:StatMSSRetrMsg_200_pop_retr_different_normal_message_for_5_times'
)
basic_class.mylogger_record.info('clear current popserv.stat file')
remote_operations.remote_operation(
    mx2_host1_ip, root_account, root_passwd,
    'su - {0} -c "> log/popserv.stat"'.format(mx_account), 0)

for i in range(1, 6):
    mypop3 = pop_operations.POP_Ops(mx1_pop1_host_ip, mx1_pop1_port)
    mypop3.pop_login(test_account_base + str(i), test_account_base + str(i))
    mypop3.pop_list()
Beispiel #3
0
for i in range(1,6):
    myimap = imap_operations.IMAP_Ops(mx1_imapserv_host1_ip,mx1_imapserv_host1_imap4Port)
    myimap.imap_login(test_account_base+str(i),test_account_base+str(i))
    myimap.imap_select()
    myimap.imap_fetch('1:5','rfc822')
    myimap.imap_fetch('1:5','rfc822.text')
    myimap.imap_fetch('1:5','body[text]')
    myimap.imap_logout()

basic_class.mylogger_record.info('fetching imapserv.stat ...')
time.sleep (50)
basic_class.mylogger_record.info('check and analyze imapserv.stat file ...')
flag,imapserv_stat_content = remote_operations.remote_operation(mx1_host1_ip,'su - {0} -c "cat log/imapserv.stat|grep StatMSSRetrMsg"'.format(mx_account),root_account,root_passwd,0)
result_lists = stat_statistics.stat_statistic(imapserv_stat_content,'[200]','StatMSSRetrMsg',75)
basic_function.summary(result_lists,'MX-11664:statMSSRetrMsg_200_imap_fetch_INBOX_1:5_body')


#2#########################################################################################################################
basic_class.mylogger_recordnf.title('running testcase:MX-11666:statMSSRetrMsg_200_imap_fetch_INBOX_1,3,4,5_body')
basic_class.mylogger_record.info('clear current imapserv.stat file')
remote_operations.remote_operation(mx1_host1_ip,'su - {0} -c "> log/imapserv.stat"'.format(mx_account),root_account,root_passwd,0)

for i in range(1,6):
    myimap = imap_operations.IMAP_Ops(mx1_imapserv_host1_ip,mx1_imapserv_host1_imap4Port)
    myimap.imap_login(test_account_base+str(i),test_account_base+str(i))
    myimap.imap_select()
    myimap.imap_fetch('1,3,4,5','rfc822')
    myimap.imap_fetch('1,3,4,5','rfc822.text')
    myimap.imap_fetch('1,3,4,5','body[text]')
    myimap.imap_logout()
Beispiel #4
0
    mypop3 = pop_operations.POP_Ops(mx1_pop1_host_ip,mx1_pop1_port)
    mypop3.pop_login(test_account_base+str(i),test_account_base+str(i))
    mypop3.pop_list()
    mypop3.pop_retr(2)
    mypop3.pop_retr(2)
    mypop3.pop_retr(2)
    mypop3.pop_retr(2)
    mypop3.pop_retr(2)
    mypop3.pop_quit()

basic_class.mylogger_record.info('fetching popserv.stat ...')
time.sleep (50)
basic_class.mylogger_record.info('check and analyze popserv.stat file ...')
popserv_stat_content = remote_operations.remote_operation(mx1_host1_ip,root_account,root_passwd,'su - {0} -c "cat log/popserv.stat|grep StatMSSRetrMsg"'.format(mx_account),0)
result_lists = stat_statistics.stat_statistic(popserv_stat_content,'[200]','StatMSSRetrMsg',25)
basic_function.summary(result_lists,'MX-11688:StatMSSRetrMsg_200_pop_retr_same_normal_message_for_5_times')


#2#########################################################################################################################
basic_class.mylogger_recordnf.title('running testcase:MX-12685:StatMSSRetrMsg_200_pop_retr_different_normal_message_for_5_times')
basic_class.mylogger_record.info('clear current popserv.stat file')
remote_operations.remote_operation(mx1_host1_ip,root_account,root_passwd,'su - {0} -c "> log/popserv.stat"'.format(mx_account),0)

for i in range(1,6):
    mypop3 = pop_operations.POP_Ops(mx1_pop1_host_ip,mx1_pop1_port)
    mypop3.pop_login(test_account_base+str(i),test_account_base+str(i))
    mypop3.pop_list()
    mypop3.pop_retr(1)
    mypop3.pop_retr(2)
    mypop3.pop_retr(3)
    mypop3.pop_retr(4)
Beispiel #5
0
    myimap.imap_select()
    myimap.imap_fetch('1:5', 'rfc822')
    myimap.imap_fetch('1:5', 'rfc822.text')
    myimap.imap_fetch('1:5', 'body[text]')
    myimap.imap_logout()

basic_class.mylogger_record.info('fetching imapserv.stat ...')
time.sleep(50)
basic_class.mylogger_record.info('check and analyze imapserv.stat file ...')
flag, imapserv_stat_content = remote_operations.remote_operation(
    mx2_host1_ip,
    'su - {0} -c "cat log/imapserv.stat|grep StatMSSRetrMsg"'.format(
        mx_account), root_account, root_passwd, 0)
result_lists = stat_statistics.stat_statistic(imapserv_stat_content, '[200]',
                                              'StatMSSRetrMsg', 75)
basic_function.summary(
    result_lists, 'MX-12745:statMSSRetrMsg_200_imap_fetch_INBOX_1:5_body')

#2#########################################################################################################################
basic_class.mylogger_recordnf.title(
    'running testcase:MX-12746:statMSSRetrMsg_200_imap_fetch_INBOX_1,3,4,5_body'
)
basic_class.mylogger_record.info('clear current imapserv.stat file')
remote_operations.remote_operation(
    mx2_host1_ip, 'su - {0} -c "> log/imapserv.stat"'.format(mx_account),
    root_account, root_passwd, 0)

for i in range(1, 6):
    myimap = imap_operations.IMAP_Ops(mx1_imapserv_host1_ip,
                                      mx1_imapserv_host1_imap4Port)
    myimap.imap_login(test_account_base + str(i), test_account_base + str(i))
    myimap.imap_select()