View Issue Details

IDProjectCategoryView StatusLast Update
0006003Talerexchangepublic2019-12-23 13:33
ReporterMarcello Stanisci Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.6Fixed in Version0.6 
Summary0006003: must align bank-lib tests to new Python bank's password management interface
DescriptionSo far, bank-lib tests relied on known-in-advance passwords to login at the Python bank and perform operations like requesting histories or issuing wire transfers.

Since the Python bank now generates random passwords for users that are programmatically created, the bank-lib tests cannot login anymore. And furthermore, the Python bank has only one *interactive* way to let users change their passwords, that makes a programmatic usage from tests more problematic.
Additional InformationLogs showing the "401 Unauthorized" error:

Dec 22 13:03:51-927695 test-bank-api-with-(fake)bank-new-26098 INFO Bank serves at `http://localhost:8081/'
2019-12-22 12:03:52,059 middleware ERROR Error: authentication failed, while serving /history?auth=basic&account_number=1&delta=1&direction=both&cancelled=omit&ordering=ascending
Unauthorized: /history
2019-12-22 12:03:52,060 log WARNING Unauthorized: /history
Dec 22 13:03:52-060245 test-bank-api-with-(fake)bank-new-26098 ERROR Unwanted response code from /history[-range]: 401
Dec 22 13:03:52-060283 test-bank-api-with-(fake)bank-new-26098 ERROR Failed at command `history-0'
22/Dec/2019:12:03:51 +0000 HTTP/1.1 GET /history?auth=basic&account_number=1&delta=1&direction=both&cancelled=omit&ordering=ascending HTTP/1.1 => 401
TagsNo tags attached.


Christian Grothoff

2019-12-22 13:10

manager   ~0015206

Oh, this is a big RC issue. Why was this changed? Can we have a way to get the old behavior, maybe with an additional command-line switch (--test-acounts) or something like that?

Christian Grothoff

2019-12-23 13:32

manager   ~0015213

Fixed in Git master by wrapping taler-bank-manage with taler-bank-manage-testing script that sets up the passwords as before -- using psql database hacking. Ugly, but Django doesn't allow non-interactive setting of passwords otherwise.

Issue History

Date Modified Username Field Change
2019-12-22 13:04 Marcello Stanisci New Issue
2019-12-22 13:04 Marcello Stanisci Status new => assigned
2019-12-22 13:04 Marcello Stanisci Assigned To => Christian Grothoff
2019-12-22 13:04 Marcello Stanisci Assigned To Christian Grothoff =>
2019-12-22 13:09 Marcello Stanisci Additional Information Updated
2019-12-22 13:10 Christian Grothoff Note Added: 0015206
2019-12-22 13:11 Christian Grothoff Product Version => git (master)
2019-12-22 13:11 Christian Grothoff Target Version => 0.6
2019-12-23 13:32 Christian Grothoff Assigned To => Christian Grothoff
2019-12-23 13:32 Christian Grothoff Status assigned => resolved
2019-12-23 13:32 Christian Grothoff Resolution open => fixed
2019-12-23 13:32 Christian Grothoff Fixed in Version => 0.6
2019-12-23 13:32 Christian Grothoff Note Added: 0015213
2019-12-23 13:33 Christian Grothoff Status resolved => closed