Sergi Delgado Segura
fb7dfd4df8
Add missing Cleaner unit tests
2019-11-11 13:28:24 +00:00
Sergi Delgado Segura
a1a1206e0c
Adds new Watcher unit tests
2019-11-08 18:25:14 +00:00
Sergi Delgado Segura
61a36048de
Removes redundant tests
2019-11-08 18:24:33 +00:00
Sergi Delgado Segura
e65b02c473
Adds Cryptographer unit tests
2019-11-08 18:20:25 +00:00
Sergi Delgado Segura
f4f77fb39a
Improves test appointment and add missing tests
2019-11-07 19:16:39 +00:00
Sergi Delgado Segura
c384bc78c2
Changes code to use bitcoin_cli from pisa/tools
2019-11-07 19:16:18 +00:00
Sergi Delgado Segura
eb0417858e
Adds missing test for EncryptedBlob
2019-11-07 19:16:18 +00:00
Sergi Delgado Segura
82f9de1717
Adds missing Watcher test
2019-11-07 16:56:31 +00:00
Sergi Delgado Segura
8f7505c17a
Improves generate_dummy_appointment
2019-11-07 16:56:15 +00:00
Sergi Delgado Segura
20f296c9d4
Reformats code to match code guidelines
2019-11-07 15:47:35 +00:00
Sergi Delgado Segura
8174ec61af
Generalizes get_dummy_appointment (there were multiple instances of it in different tests)
...
Also refactors some unused imports and modifies the watcher tests to use .serialize instead of to_json
2019-11-07 15:08:06 +00:00
Sergi Delgado Segura
99bda73eff
Applies fixes after PR review
2019-11-07 15:07:58 +00:00
Salvatore Ingala
00a27b68e6
Various fixes from PR review
2019-11-07 15:04:21 +00:00
Salvatore Ingala
24a451c108
Avoiding long strings by using random dummy txids; code formatting
2019-11-07 15:04:21 +00:00
Salvatore Ingala
21db172727
Refactored pisa_cli to improve testability; added test with wrong signature returned
2019-11-07 15:04:21 +00:00
Salvatore Ingala
956d7091eb
Initial tests for pisa-cli
2019-11-07 15:04:21 +00:00
Sergi Delgado Segura
810f6ec525
Adds methods to store the locator map in the db
...
In order to use the db for system monitoring we need a way of mapping the locator the the uuids the appointments/jobs are identified in the db. First steps towards #15
2019-11-06 17:08:05 +00:00
Sergi Delgado Segura
6cb6aecc8c
Uses dummy functions from conftest and extends with Appointment.triggered flag
2019-11-05 19:13:47 +00:00
Sergi Delgado Segura
a6b1f96aaf
Adds dummy appointment and job methods to conftest and includes triggered param to test_api
2019-11-05 19:11:58 +00:00
Sergi Delgado Segura
2bfee7bbcc
Fixes simulator forks
2019-11-02 21:18:24 -07:00
Sergi Delgado Segura
fc1b8aa13c
Adds Builder unit test
2019-11-02 21:17:50 -07:00
Sergi Delgado Segura
65bead3ef7
Uses bitcoin-cli instead of the api for getblockcount
2019-11-02 21:17:35 -07:00
Sergi Delgado Segura
8ad3ae5f1d
Initializes block_queue on init
...
Building from backed up data may require initializing the block queues of both the watcher and responder with the blocks they've missed.
2019-10-30 12:20:42 -07:00
Sergi Delgado Segura
62a68c99cb
Fixes #53
2019-10-29 15:20:23 -07:00
Sergi Delgado Segura
a385fa16a9
Adds DBManager unit tests
2019-10-29 14:51:59 -07:00
Sergi Delgado Segura
dfaec51a3b
Updates tests to dissable logging based on 17e6066
2019-10-28 14:49:52 -07:00
Sergi Delgado Segura
f61474216c
Fixes and tests updates
...
Updates tests so they run with the db_manager and fixes some bugs introduced in d7d42c9.
2019-10-28 14:49:40 -07:00
Sergi Delgado Segura
7432eb1373
Improves sim with basic fork logic
2019-10-28 14:38:56 -07:00
Salvatore Ingala
f0143efd14
Move test_sign_appointment after test_add_appointment, as per PR review
2019-10-28 11:11:39 +07:00
Salvatore Ingala
df9a1173a5
Minor refactoring of test_watcher; revert change DEFAULT_PISA_API_SERVER to correct value
2019-10-25 15:03:57 +08:00
Salvatore Ingala
bb090897b4
Test that signature is None if appointment is not added
2019-10-24 12:23:56 +08:00
Salvatore Ingala
a19bfa13ff
Separated signing logic of the Watcher in sign_appointment function; added unit test
2019-10-24 12:19:33 +08:00
Salvatore Ingala
e80206c2cd
Merge branch 'master' into 13-appointment-signature
2019-10-23 20:51:11 +08:00
Sergi Delgado Segura
52f52f57f8
Apply requested changes
...
- Adds a PRG based on a hardcoded seed to make the tests reproducible (get_random_value_hex)
- Updates all the tests replacing urandom for get_random_value_hex
- Properly places misplaced bitcoin_cli in bitcoin_sim_tests
- Typos
2019-10-23 12:40:25 +01:00
Salvatore Ingala
cd2f3610f9
Merge branch 'testing' into 13-appointment-signature
2019-10-23 09:19:44 +08:00
Sergi Delgado Segura
af0e9c81b5
Adds some missing tests
2019-10-22 16:38:28 +01:00
Sergi Delgado Segura
9d9d7b1e5b
Adds responder unit tests
2019-10-22 15:14:38 +01:00
Sergi Delgado Segura
7a222d43fe
Updates test cleaner and removes retry_counter for responder
2019-10-22 15:09:47 +01:00
Sergi Delgado Segura
018faa07d1
Fixes change endianness
...
Porting change_endianness from Python2 to Python3 introduced a bug.
2019-10-22 14:59:09 +01:00
Salvatore Ingala
1601f0ca15
Renamed constants and default file names for Pisa's private and public keys
2019-10-22 12:13:12 +08:00
Sergi Delgado Segura
94156a67cc
Adds generate_blocks
2019-10-21 18:12:05 +01:00
Salvatore Ingala
a73b14bf13
Fix signature verificatio in pisa-cli
2019-10-18 15:40:57 +08:00
Salvatore Ingala
414a4638bd
Added signature verification to watcher's add_appointment test
2019-10-18 12:37:06 +08:00
Salvatore Ingala
2881101e36
Fixed missing return value in test
2019-10-18 08:41:44 +08:00
Salvatore Ingala
f4bfd5ef40
Merge branch 'testing' into 13-appointment-signature
2019-10-18 08:32:38 +08:00
Sergi Delgado Segura
6735aac094
Update tests to use bitcoind_sim event-wise
...
Also clean son unused imports
2019-10-17 19:08:34 +01:00
Sergi Delgado Segura
1643a7b887
Multiple simulator improvements
...
The simulator has been updated to work with real transaction structures instead of transaction hashes. It now supports:
- Non-SegWit transaction format
- Generation of blocks event-wise and time-wise
Some small issues have also been fixed.
With the new approach, the simulator can be used in a broader range of tests. Moreover tests can run faster since they do not have to wait for blocks. Instead, the generation of new blocks can be triggered by the test.
2019-10-17 19:00:15 +01:00
Sergi Delgado Segura
95759793ba
Fixes bitcoin_cli
...
bitcoin_cli as a global variable in the main __init__.py was creating issues related to http.client.CannotSendRequest: Request-sent and connection re-usage. Define a new connection per request.
2019-10-17 17:17:52 +01:00
Salvatore Ingala
db522500c3
Switched to cryptography instead of ecdsa for signatures
2019-10-17 17:02:09 +08:00
Salvatore Ingala
7c1d8b69c7
Changed to_json to to_dict in Appointment and Job; added to_json to Appointment to actually return a string
2019-10-17 09:59:34 +08:00