Commit graph

1315 commits

Author SHA1 Message Date
Jonathan Zernik
efdcbdeaef
Add test for check payment point with success (#1591) 2021-10-12 21:17:21 -07:00
Jonathan Zernik
ee7ace8e8e
Add test for case when lnd getinfo has no uris (#1590) 2021-10-12 20:15:07 -07:00
Jonathan Zernik
535aa741e1
Combine reduntant tests for squeak core create offer (#1588) 2021-10-12 19:51:56 -07:00
Jonathan Zernik
0dcbeea7c4
Add assertions on sent payment attributes (#1587) 2021-10-12 19:39:18 -07:00
Jonathan Zernik
c7fa4ec47c
Add test for send payment with failure (#1586) 2021-10-12 19:29:21 -07:00
Jonathan Zernik
dd927036a5
Add block_info fixture to global conftest (#1584) 2021-10-12 19:00:44 -07:00
Jonathan Zernik
8a317baabd
Add test for create offer without nonce (#1583) 2021-10-12 17:24:36 -07:00
Jonathan Zernik
1e1e3738c9
Remove old comments from squeak core unit test (#1581) 2021-10-12 16:47:33 -07:00
Jonathan Zernik
fb3b7fcd3a
Add test for invalid block hash (#1580)
* Add test for invalid block hash in get block header method

* Add test for invalid squeak hash in unpack offer method

* Add assertions for exception messages in squeak core tests
2021-10-12 16:45:41 -07:00
Jonathan Zernik
3dcc2681d5
Simplify unit tests for interests (#1579) 2021-10-12 15:11:38 -07:00
Jonathan Zernik
bae8063c28
Add test for fail to make squeak with contact profile (#1578) 2021-10-12 14:45:14 -07:00
Jonathan Zernik
c48450598b
Add check for payment point in unpack offer (#1577)
* Add check for payment point in unpack offer

* Update TODO comment for enable checking payment point
2021-10-12 14:28:18 -07:00
Jonathan Zernik
98bd5f9eb9
Use logger.exception in app.py when request fails (#1570) 2021-10-12 01:38:43 -07:00
Jonathan Zernik
eb52cc8bb1
Disable test start and stop squeak node unit test (#1574) 2021-10-12 01:36:39 -07:00
Jonathan Zernik
4ec1f28712
Don't raise exception on failure in peer server accept (#1572) 2021-10-12 01:22:10 -07:00
Jonathan Zernik
f694123777
Remove secret key field of sent offer (#1568)
* Remove secret_key column from sent_offers db table

* Allow secret_key column to be null in downgrade migration

* Set default value of secret key for sent offer in db downgrade

* Remove comment from db downgrage function

* Try making downgrade for secret key column work

* Try formatting update op in downgrade function

* Try defining sent offers table inline in downgrade function

* Fix batch alter column in downgrade function
2021-10-12 00:29:21 -07:00
Jonathan Zernik
956390e1fb
Mock out more workers in squeak node unit test (#1565) 2021-10-11 19:12:26 -07:00
Jonathan Zernik
ace600f4c6
Added unit tests for generate nonce functions (#1564) 2021-10-11 18:59:48 -07:00
Jonathan Zernik
5c31b55499
Rename core crypto module (#1563) 2021-10-11 18:46:48 -07:00
Jonathan Zernik
0f11eb4f99
Got outline of tests for squeak core methods (#1562)
* Got outline of tests for squeak core methods

* Split squeak core test fixtures into seller and buyer

* Add unit tests for decrypt content from sent payment in squeak core
2021-10-11 18:22:20 -07:00
Jonathan Zernik
f49874c1e6
Improve squeak core tests (#1560)
* Use fixture for block in mock bitcoin client

* Simplify unit test for make squeak method

* Simplify make squeak method even more

* Added unit test for create offer

* Add TODO comment for preimage fixture
2021-10-10 23:48:06 -07:00
Jonathan Zernik
f82987855f
Update frontend build (#1559) 2021-10-10 21:17:23 -07:00
Jonathan Zernik
4ca835b2fb
Replace use_tor field with network in peer address (#1558)
* Replace use_tor field with network in peer address

* Got itest passing with network column in db.

* Got frontend working with network (ipv4 or torv3) configurable

* Fix go to peer address page navigation from sent payment and received payment
2021-10-10 21:00:56 -07:00
Jonathan Zernik
9f6307cbb3
Add rpc to get default peer port (#1556)
* Added get default peer port rpc command

* Use default port in connect peer dialog

* Got default port working on create peer dialog

* Got default port working in both connect peer and create peer.

* Remove default peer usage in create peer backend

* Remove default peer handling for connect peer in backend

* Reset port back to empty when use custom is checked or unchecked.
2021-10-10 00:30:27 -07:00
Jonathan Zernik
25c8669991
Remove commented out subparser in main module (#1552) 2021-10-09 22:30:05 -07:00
Jonathan Zernik
12f7b62349
Add toggle for connect with tor (#1550)
* Added use_tor option to peer address class and grpc message

* Got itest passing without tor

* Got peer connection working in UI with tor toggle

* Able to connect to with and without tor

* Got save peer working with tor and without tor

* Add use_tor field to peer address everywhere.

* Fix usage of useMemo in peer address page
2021-10-09 22:26:54 -07:00
Jonathan Zernik
e28797eb2e
Remove print statements from lnd client (#1549) 2021-10-09 14:51:40 -07:00
Jonathan Zernik
a1b2ad2b0a
Add more unit tests lnd lightning client (#1548)
* Added test for pay invoice method

* Remove old comments

* Add test for decode pay req

* Add more unit tests for lnd lightning client
2021-10-09 14:46:16 -07:00
Jonathan Zernik
202d648ff7
Added unit test for get info method of lightning client (#1543) 2021-10-08 23:12:18 -07:00
Jonathan Zernik
6aae503de8
Create lightning client base class (#1542)
* Add unit test for add invoice in test lnd lightning client

* Add new create invoice method of lightning client and add unit test
2021-10-08 20:40:58 -07:00
Jonathan Zernik
fc691ffeb2
Add call args assertions bitcoin client test (#1541)
* Add assertions for call args for some bitcoin client mocks

* Simplify bitcoin core client

* Add assertions on call args for getblockcount

* Add test for make_request method of bitcoin core client

* Use make_request method for bitcoin connection error tests

* Remove old comments

* Use call arg assertions for all methods of bitcoin core client
2021-10-08 12:29:27 -07:00
Jonathan Zernik
bc4698f42f
Use decorator for protobuf flask routes (#1538)
* Use protobuf decorator for squeak admin routes in app

* Remove old grpc route comment

* Use protobuf decorator for all rpc endpoints

* Delete handle_request function in flask app

* Remove old comments in flask rpc routes
2021-10-07 23:31:39 -07:00
Jonathan Zernik
391fe7474c
Use deserialized block header in info object (#1536)
* Change block info struct to hold deserialized block header

* Delete bitcoin util module
2021-10-07 20:54:14 -07:00
Jonathan Zernik
831c96d47e
Add args to docstring for bitcoin client class (#1535) 2021-10-07 20:09:13 -07:00
Jonathan Zernik
545d45299a
Add docstrings for bitcoin client class (#1534) 2021-10-07 20:06:31 -07:00
Jonathan Zernik
315a84f846
Add comment for block hash and block header fixtures in bitcoin client test (#1533) 2021-10-07 19:52:45 -07:00
Jonathan Zernik
e0c63e2927
Add tests for bitcoin client get count method (#1530)
* Add tests for bitcoin client get count method

* Rename bitcoin exceptions

* Got test working for bitcoin http error

* Added tests for get block count and get block hash

* Added tests for all bitcoin client methods

* Added tests for invalid results

* Remove check for empty result which is not needed

* Add test for all bitcoin request errors

* Rename bitcoin connection error exception

* Remove print statments from bitcoin client

* Got 100% coverage for bitcoin client

* Add todos to assert mocks called with correct args

* Rename bitcoin core client class and module
2021-10-07 19:42:15 -07:00
Jonathan Zernik
7a88fd95ed
Retry init db on startup so that itest passes (#1532) 2021-10-07 19:29:31 -07:00
Jonathan Zernik
8d0d658e4d
Better use of fixtures for profile ids (#1529) 2021-10-07 04:25:26 -07:00
Jonathan Zernik
7aa88efd17
Improve fixure for liked and unliked squeak hashes (#1528) 2021-10-07 03:59:52 -07:00
Jonathan Zernik
be5815d402
Use more fixtures for timeline query test (#1527)
* Use fixture for followed and unfollowed squeaks in timeline test

* Use fixture for inserted signing profile

* Use more fixtures for profiles in tests

* Use better fixture for get like squeaks query test

* Use fixtures for liked and unliked squeak in set liked and set unliked test
2021-10-07 03:50:03 -07:00
Jonathan Zernik
c5d189dde3
Use more fixtures for squeak db test (#1526)
* Add test for get liked squeaks and set like and set unliked

* Simplify squeak db tests with more fixtures

* Add test for get locked squeak

* Add test for get secret key for missing squeak
2021-10-07 02:51:46 -07:00
Jonathan Zernik
411db3d6b8
Add test for get liked squeaks and set like and set unliked (#1525) 2021-10-07 02:17:48 -07:00
yzernik
4560601d34 Release version 0.1.160 2021-10-07 00:48:43 -07:00
Jonathan Zernik
61e29ce27a
Add opentimestamps GitHub action (#1524)
* Add opentimestamps github action

* Remove custom message
2021-10-06 21:41:15 -07:00
Jonathan Zernik
e1a9674200
Add unit test for set profile following (#1520) 2021-10-06 15:39:42 -07:00
Jonathan Zernik
2a55b44b97
Add get timeline squeak entries test (#1518)
* WIP: most of timeline db query test

* Got unit test for timeline query working with followed profile

* Remove old commented create signing profile function
2021-10-05 19:38:35 -07:00
Jonathan Zernik
9c599ee0e3
Add test util functions (#1515)
* Create test utils module for unit tests

* Improve squeak db unit tests using generated block header object

* Add assertion for block time in get squeak entry test
2021-10-05 15:28:25 -07:00
Jonathan Zernik
1259300ba0
Capitalize bitcoin in readme (#1511) 2021-10-05 03:02:26 -07:00
Jonathan Zernik
c3f4f80d30
Move set up test socket function to util module (#1510) 2021-10-05 00:39:12 -07:00