tests: add some logs to debug some sporadic test failures

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino 2023-12-17 10:46:21 +01:00
parent ba472c3c67
commit 5f30ea3658
No known key found for this signature in database
GPG key ID: 935D2952DEC4EECF
2 changed files with 4 additions and 2 deletions

View file

@ -314,7 +314,7 @@ func TestTransferCheckerTransferQuota(t *testing.T) {
transfer1.BytesReceived.Store(1024*1024 + 1)
transfer2.BytesReceived.Store(0)
Connections.checkTransfers()
assert.True(t, conn1.IsQuotaExceededError(transfer1.errAbort))
assert.True(t, conn1.IsQuotaExceededError(transfer1.errAbort), transfer1.errAbort)
assert.Nil(t, transfer2.errAbort)
transfer1.errAbort = nil
transfer1.BytesReceived.Store(1024*1024 + 1)

View file

@ -10378,7 +10378,9 @@ func TestSCPTransferQuotaLimits(t *testing.T) {
user, _, err = httpdtest.GetUserByUsername(user.Username, http.StatusOK)
assert.NoError(t, err)
assert.Greater(t, user.UsedDownloadDataTransfer, int64(1024*1024))
assert.Greater(t, user.UsedUploadDataTransfer, int64(1024*1024))
if !assert.Greater(t, user.UsedUploadDataTransfer, int64(1024*1024)) {
printLatestLogs(30)
}
err = os.Remove(testFilePath)
assert.NoError(t, err)