diff options
Diffstat (limited to 'examples/imapresource/tests/imapmailsynctest.cpp')
-rw-r--r-- | examples/imapresource/tests/imapmailsynctest.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/imapresource/tests/imapmailsynctest.cpp b/examples/imapresource/tests/imapmailsynctest.cpp index 23bb4e5..cdb85dd 100644 --- a/examples/imapresource/tests/imapmailsynctest.cpp +++ b/examples/imapresource/tests/imapmailsynctest.cpp | |||
@@ -43,7 +43,7 @@ protected: | |||
43 | bool isBackendAvailable() Q_DECL_OVERRIDE | 43 | bool isBackendAvailable() Q_DECL_OVERRIDE |
44 | { | 44 | { |
45 | QTcpSocket socket; | 45 | QTcpSocket socket; |
46 | socket.connectToHost("localhost", 993); | 46 | socket.connectToHost("localhost", 143); |
47 | return socket.waitForConnected(200); | 47 | return socket.waitForConnected(200); |
48 | } | 48 | } |
49 | 49 | ||
@@ -56,7 +56,7 @@ protected: | |||
56 | { | 56 | { |
57 | auto resource = ApplicationDomain::ImapResource::create("account1"); | 57 | auto resource = ApplicationDomain::ImapResource::create("account1"); |
58 | resource.setProperty("server", "localhost"); | 58 | resource.setProperty("server", "localhost"); |
59 | resource.setProperty("port", 993); | 59 | resource.setProperty("port", 143); |
60 | resource.setProperty("username", "doe"); | 60 | resource.setProperty("username", "doe"); |
61 | Sink::SecretStore::instance().insert(resource.identifier(), "doe"); | 61 | Sink::SecretStore::instance().insert(resource.identifier(), "doe"); |
62 | return resource; | 62 | return resource; |
@@ -67,7 +67,7 @@ protected: | |||
67 | auto resource = ApplicationDomain::ImapResource::create("account1"); | 67 | auto resource = ApplicationDomain::ImapResource::create("account1"); |
68 | //Using a bogus ip instead of a bogus hostname avoids getting stuck in the hostname lookup | 68 | //Using a bogus ip instead of a bogus hostname avoids getting stuck in the hostname lookup |
69 | resource.setProperty("server", "111.111.1.1"); | 69 | resource.setProperty("server", "111.111.1.1"); |
70 | resource.setProperty("port", 993); | 70 | resource.setProperty("port", 143); |
71 | resource.setProperty("username", "doe"); | 71 | resource.setProperty("username", "doe"); |
72 | Sink::SecretStore::instance().insert(resource.identifier(), "doe"); | 72 | Sink::SecretStore::instance().insert(resource.identifier(), "doe"); |
73 | return resource; | 73 | return resource; |
@@ -80,21 +80,21 @@ protected: | |||
80 | 80 | ||
81 | void createFolder(const QStringList &folderPath) Q_DECL_OVERRIDE | 81 | void createFolder(const QStringList &folderPath) Q_DECL_OVERRIDE |
82 | { | 82 | { |
83 | Imap::ImapServerProxy imap("localhost", 993); | 83 | Imap::ImapServerProxy imap("localhost", 143, Imap::NoEncryption); |
84 | VERIFYEXEC(imap.login("doe", "doe")); | 84 | VERIFYEXEC(imap.login("doe", "doe")); |
85 | VERIFYEXEC(imap.create("INBOX." + folderPath.join('.'))); | 85 | VERIFYEXEC(imap.create("INBOX." + folderPath.join('.'))); |
86 | } | 86 | } |
87 | 87 | ||
88 | void removeFolder(const QStringList &folderPath) Q_DECL_OVERRIDE | 88 | void removeFolder(const QStringList &folderPath) Q_DECL_OVERRIDE |
89 | { | 89 | { |
90 | Imap::ImapServerProxy imap("localhost", 993); | 90 | Imap::ImapServerProxy imap("localhost", 143, Imap::NoEncryption); |
91 | VERIFYEXEC(imap.login("doe", "doe")); | 91 | VERIFYEXEC(imap.login("doe", "doe")); |
92 | VERIFYEXEC(imap.remove("INBOX." + folderPath.join('.'))); | 92 | VERIFYEXEC(imap.remove("INBOX." + folderPath.join('.'))); |
93 | } | 93 | } |
94 | 94 | ||
95 | QByteArray createMessage(const QStringList &folderPath, const QByteArray &message) Q_DECL_OVERRIDE | 95 | QByteArray createMessage(const QStringList &folderPath, const QByteArray &message) Q_DECL_OVERRIDE |
96 | { | 96 | { |
97 | Imap::ImapServerProxy imap("localhost", 993); | 97 | Imap::ImapServerProxy imap("localhost", 143, Imap::NoEncryption); |
98 | VERIFYEXEC_RET(imap.login("doe", "doe"), {}); | 98 | VERIFYEXEC_RET(imap.login("doe", "doe"), {}); |
99 | VERIFYEXEC_RET(imap.append("INBOX." + folderPath.join('.'), message), {}); | 99 | VERIFYEXEC_RET(imap.append("INBOX." + folderPath.join('.'), message), {}); |
100 | return "2:*"; | 100 | return "2:*"; |
@@ -102,14 +102,14 @@ protected: | |||
102 | 102 | ||
103 | void removeMessage(const QStringList &folderPath, const QByteArray &messages) Q_DECL_OVERRIDE | 103 | void removeMessage(const QStringList &folderPath, const QByteArray &messages) Q_DECL_OVERRIDE |
104 | { | 104 | { |
105 | Imap::ImapServerProxy imap("localhost", 993); | 105 | Imap::ImapServerProxy imap("localhost", 143, Imap::NoEncryption); |
106 | VERIFYEXEC(imap.login("doe", "doe")); | 106 | VERIFYEXEC(imap.login("doe", "doe")); |
107 | VERIFYEXEC(imap.remove("INBOX." + folderPath.join('.'), messages)); | 107 | VERIFYEXEC(imap.remove("INBOX." + folderPath.join('.'), messages)); |
108 | } | 108 | } |
109 | 109 | ||
110 | void markAsImportant(const QStringList &folderPath, const QByteArray &messageIdentifier) Q_DECL_OVERRIDE | 110 | void markAsImportant(const QStringList &folderPath, const QByteArray &messageIdentifier) Q_DECL_OVERRIDE |
111 | { | 111 | { |
112 | Imap::ImapServerProxy imap("localhost", 993); | 112 | Imap::ImapServerProxy imap("localhost", 143, Imap::NoEncryption); |
113 | VERIFYEXEC(imap.login("doe", "doe")); | 113 | VERIFYEXEC(imap.login("doe", "doe")); |
114 | VERIFYEXEC(imap.select("INBOX." + folderPath.join('.'))); | 114 | VERIFYEXEC(imap.select("INBOX." + folderPath.join('.'))); |
115 | VERIFYEXEC(imap.addFlags(KIMAP2::ImapSet::fromImapSequenceSet(messageIdentifier), QByteArrayList() << Imap::Flags::Flagged)); | 115 | VERIFYEXEC(imap.addFlags(KIMAP2::ImapSet::fromImapSequenceSet(messageIdentifier), QByteArrayList() << Imap::Flags::Flagged)); |