File: test-smtp.patch

package info (click to toggle)
ulfius 2.7.15-2.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,856 kB
  • sloc: ansic: 23,025; makefile: 708; sh: 140
file content (79 lines) | stat: -rw-r--r-- 1,896 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Description: Remove smtp tests that fail at random
Author: Nicolas Mora <babelouest@debian.org>
Forwarded: not-needed
--- a/test/framework.c
+++ b/test/framework.c
@@ -26,12 +26,14 @@
 #include <check.h>
 #include <ulfius.h>
 
+#if 0
 #define SMTP_FROM "sender@localhost"
 #define SMTP_TO "recipient@localhost"
 #define SMTP_HOST "localhost"
 #define SMTP_PORT 2525
 #define SMTP_SUBJECT "E-mail subject for the test"
 #define SMTP_BODY "E-mail body for the test as well"
+#endif
 
 #define BACKLOG_MAX  (10)
 #define BUF_SIZE  4096
@@ -40,6 +42,7 @@
 #define BODY_NOT_REDIRECTED "This is the blue pill"
 #define BODY_REDIRECTED "Welcome to the Matrix, Neo!"
 
+#if 0
 #define PORT_PLAIN 2525
 #define PORT_RICH 2526
 #define FROM "from"
@@ -49,6 +52,7 @@
 #define CONTENT_TYPE "text/ulfius; charset=utf-42"
 #define SUBJECT "subject"
 #define BODY "mail body"
+#endif
 
 #define KEY1 "key1"
 #define KEY2 "kéy2"
@@ -66,6 +70,7 @@
   int sockfd;
 };
 
+#if 0
 /**
  * 
  * Function that emulates a very simple SMTP server
@@ -251,6 +256,7 @@
 
   pthread_exit(NULL);
 }
+#endif
 
 static char * get_file_content(const char * file_path) {
   char * buffer = NULL;
@@ -1303,6 +1309,7 @@
 }
 END_TEST
 
+#if 0
 START_TEST(test_ulfius_send_smtp)
 {
   pthread_t thread;
@@ -1357,6 +1364,7 @@
   manager.mail_data = NULL;
 }
 END_TEST
+#endif
 
 START_TEST(test_ulfius_follow_redirect)
 {
@@ -1634,8 +1642,10 @@
   tcase_add_test(tc_core, test_ulfius_utf8_ignored);
   tcase_add_test(tc_core, test_ulfius_endpoint_callback_position);
   tcase_add_test(tc_core, test_ulfius_MHD_set_response_with_other_free);
+#if 0
   tcase_add_test(tc_core, test_ulfius_send_smtp);
   tcase_add_test(tc_core, test_ulfius_send_rich_smtp);
+#endif
   tcase_add_test(tc_core, test_ulfius_follow_redirect);
   tcase_add_test(tc_core, test_ulfius_shared_data);
   tcase_add_test(tc_core, test_ulfius_malformed_requests);