Sergi Delgado Segura
c679d59451
Merge branch '59-uncovered-tests'
2019-12-04 14:41:24 +01:00
Turtle
98b3dcae7b
Test that server validates signature properly
2019-11-28 09:04:43 -05:00
Sergi Delgado Segura
d2b7216a96
Addresses requested changes
2019-11-22 14:48:38 +00:00
Sergi Delgado Segura
2183c57f53
Updates handle_reorgs and deletes check_tx_in_chain
...
Updates handle_reorg to work with the current version of the Responder (the old code was outdated and broken).
`check_tx_in_chain` was only used by `handle_reorgs`, and made not much sense at this point. The method need to check if the transaction is in mempool or blockchain, so it seems to make more sense bulding on top of `get_transaction`.
2019-11-20 15:41:50 +00:00
Sergi Delgado Segura
3dad5b7c71
Adds tests for check_tx_in_chain
2019-11-20 13:01:56 +00:00
Sergi Delgado Segura
287dfeeee3
Adds missing test on BlockProessor
2019-11-18 16:39:50 +00:00
Sergi Delgado Segura
764e513ab9
Replaces asserts for Exceptions in simulator
2019-11-18 16:39:23 +00:00
Sergi Delgado Segura
a1c0eeadbc
Add missing EncryptedBlob tests
2019-11-18 15:25:15 +00:00
Sergi Delgado Segura
6ff580ed8f
Updates test_api according to 1b78060 and add missing cases
2019-11-14 17:38:26 +00:00
Sergi Delgado Segura
f33d2d61ac
Moves start api to test_api since it was the only place where it's used
2019-11-14 17:38:19 +00:00
Sergi Delgado Segura
1d1efc9ccf
Adds some missing Responder unit tests
...
Excluding the basic reorgs hangle, we need a better bitcoind mock or a different testing approach to reach a higher code coverage. This is as far as it can get for the Responder at the moment
2019-11-14 15:05:45 +00:00
Sergi Delgado Segura
ca3f6ee1b1
Fixes memory leak bug regarding test db
2019-11-14 15:04:55 +00:00
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
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
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
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
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