aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-29 16:36:51 +0200
committerDanilo M. <danix@danix.xyz>2026-09-29 16:36:51 +0200
commit970860d71937dddcc0543b8a76ce496d341a5ced (patch)
tree29c2be7b76a94e7d1edefc127bd208933caae3e3 /tests
parent604533b8ea0b55702b8d17cc92759eee1d2e1760 (diff)
downloadqtmaildir-970860d71937dddcc0543b8a76ce496d341a5ced.tar.gz
qtmaildir-970860d71937dddcc0543b8a76ce496d341a5ced.zip
test: keep the cron-drain test off the real sync status
aSuccessfulCronSyncDrainsTheEditedAccounts named a log but no status file, so Config fell back to ~/.local/state/qtmaildir/syncstatus.json and the test passed or failed on the developer's last cron run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/test_mainwindow.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_mainwindow.cpp b/tests/test_mainwindow.cpp
index f6f75aa..f008b10 100644
--- a/tests/test_mainwindow.cpp
+++ b/tests/test_mainwindow.cpp
@@ -7455,11 +7455,15 @@ void TestMainWindow::aSuccessfulCronSyncDrainsTheEditedAccounts()
const QString confPath = dir.filePath(QStringLiteral("qtmaildir.conf"));
QFile conf(confPath);
QVERIFY(conf.open(QIODevice::WriteOnly | QIODevice::Text));
- conf.write(QStringLiteral("[sync]\nlog=%1\n\n"
+ // status= keeps Config off the real syncstatus.json, the leak
+ // noSyncTestReadsTheRealSyncState() records; this test missed it and
+ // failed whenever the developer's last cron run left a channel queued.
+ conf.write(QStringLiteral("[sync]\nlog=%1\nstatus=%2\n\n"
"[account.work]\n"
"maildir=work-mail\n"
"channel=work-channel\n")
- .arg(logPath).toUtf8());
+ .arg(logPath, dir.filePath(QStringLiteral("no-status.json")))
+ .toUtf8());
conf.close();
Config config;