jMyles
fdb726095a
Some more debug-level logs instead of prints.
2020-08-10 12:55:29 -07:00
jMyles
cf196f2c72
Much more leeway in the number of nodes that have the map when we unblock (as this varies widely just on my laptop, depending on what else I'm running in the background.
2020-08-10 12:55:29 -07:00
jMyles
663b7de3c8
Lots of Character stoppages; these continually running loops went unnoticed before.
2020-08-10 12:55:27 -07:00
jMyles
e0918764d8
Big fixup for the remaining errors blocking integration.learning.
2020-08-10 12:54:35 -07:00
jMyles
a448903bbb
This makes more sense, because you might block the main thread in a test, and then the Ursula can't process the request.
2020-08-10 12:54:05 -07:00
jMyles
3fa81deb00
Loading seednodes here is enough.
2020-08-10 12:54:05 -07:00
jMyles
eaf7fbca37
Some debugging breadcrumbs for Ursula.
2020-08-10 12:54:04 -07:00
jMyles
8cd182e26d
Stopping Bob and Ursula at appropriate times.
2020-08-10 12:53:33 -07:00
jMyles
78eb904c10
Flagging test bob's origins for inspection on other threads.
2020-08-10 12:53:33 -07:00
jMyles
266eea23ca
Yanking some autouses in favor of usefixtures. [skip ci]
2020-08-10 12:53:03 -07:00
Kieran R. Prasch
041622c40d
Allow worker to attempt period commitment as part of it's initialization.
2020-08-10 12:52:31 -07:00
jMyles
16bc34754d
Another test that was passing for the wrong reason. It now works regardless of whether the future Ursula is a hardcoded seednode or a user-specified one.
2020-08-10 12:52:31 -07:00
jMyles
9437009ffd
Add a measure of maturation time; if this increases dramatically, that will represent a breakage.
2020-08-10 12:52:31 -07:00
jMyles
a0db5ffb15
Moving federated tests into their own module to keep the cache cleaner.
2020-08-10 12:52:30 -07:00
jMyles
d6d9fb4b62
This test needs to look for the checksum_address specifically, since this will be a stranger node or sprout now.
2020-08-10 12:51:49 -07:00
jMyles
ea092fd4d3
Using lonely_ursula_maker in all the right places.
2020-08-10 12:51:49 -07:00
jMyles
0b318c2866
Clarify each fleet state (because one of them is the result of the seednode loading).
2020-08-10 12:51:11 -07:00
jMyles
eebf26e334
This test is no longer relevant; the seednode tests cover this logic equally well.
2020-08-10 12:51:11 -07:00
jMyles
cc7e96f671
This entire test (and part of another) is no longer relevant, as Alice and Bob will learn about seednodes form their hardcoded domain list in such a scenario.
2020-08-10 12:51:11 -07:00
jMyles
392d51f711
This is a more acute test with a nonstandard domain, as it assures that the actual seednode logic is used.
2020-08-10 12:51:11 -07:00
jMyles
0a52a8edb7
Longer time allowance for this test; it will still almost certainly pass in the faster times on CI, but it's a pain to have it fail locally.
2020-08-10 12:51:11 -07:00
jMyles
2c4c7a0b15
We no longer need to lower the parameter here; this test can pass in time with all 5000.
2020-08-10 12:51:10 -07:00
jMyles
21ed54097c
We need to fetch the actual Ursula from the cache to get the bytestring; this will be a sprout nowadays.
2020-08-10 12:49:53 -07:00
jMyles
9f117ebc6a
A Character created from blank config will try to connect to seednodes without lonely.
2020-08-10 12:49:26 -07:00
jMyles
a3a21ff49e
The number of known nodes might be a bit variable at this point; we're really concerned that he has only connected to 2.
2020-08-10 12:49:26 -07:00
jMyles
1101dd3bde
The first node in the fixture might not always be among the matching nodes.
2020-08-10 12:49:26 -07:00
jMyles
76649704ae
Clarifying failure message; this makes it easier to understand why this test occasionally fails.
2020-08-10 12:49:26 -07:00
jMyles
b199830947
This will be the basis of a merge commit in the rebase of these tests. One of them reactivates Vladimir; the other fixes the method for testing the presence of Treasure Maps.
2020-08-10 12:49:25 -07:00
jMyles
babcd9174e
No need to reset checksum_address in Worker - let's try to set it in as few places as possible. #1547 .
2020-08-10 12:49:23 -07:00
jMyles
14165eb4db
Instead of the first Ursula, choose the first Ursula who is supposed to have the map.
2020-08-10 12:48:31 -07:00
jMyles
295518033e
Refining both test and threadpooling. Looking pretty good now.
2020-08-10 12:45:22 -07:00
jMyles
230bcdc26d
Honing in on the most important concurrent test assertions. This passes, but we can do even better.
2020-08-10 12:45:22 -07:00
jMyles
c1cc0395e5
This zany test actually passes - now to get that 30 second limit down.
2020-08-10 12:45:22 -07:00
jMyles
05b589121b
It's slow, but it's a start. This test passes in about 9 seconds right now; subsequent commits will tune it.
2020-08-10 12:45:22 -07:00
jMyles
60b9ad9c2b
Test using the sluggish middleware; this is the one that will require the concurrency from the last commit.
2020-08-10 12:45:21 -07:00
jMyles
106b60f3f7
Mocking one layer out (setting policy) for these tests.
2020-08-10 12:42:15 -07:00
jMyles
3e9cf80386
Splitting test logic to show when the problem is with Bob or with Alice.
2020-08-10 12:39:59 -07:00
tuxxy
d033c0b318
Respond to review changes
2020-08-10 15:38:59 +02:00
tuxxy
c6d229c2bf
Fix typo in comment (thanks @fjarri)
2020-08-10 15:38:59 +02:00
tuxxy
530dc3439a
Respond to change requests
2020-08-10 15:38:59 +02:00
tuxxy
71f8b914e0
Instead of mocking a LMDB env, we just manage them appropriately
2020-08-10 15:38:59 +02:00
tuxxy
b1817cc9f2
Remove Ursula.work_orders and replace its use with queries to the datastore
2020-08-10 15:38:13 +02:00
tuxxy
52038e36dc
Create a MockLMDBEnv w/ fixture and fix up some tests
...
Patch the PolicyArrangement model to fix discovery phase tests
2020-08-10 15:38:12 +02:00
tuxxy
846625d917
Replace as much old datastore logic as possible
2020-08-10 15:37:30 +02:00
tuxxy
17920cd4ca
Add 'DatastoreRecord.delete' method w/ tests
...
Remove the unused '_fields' instance var on DatastoreRecord
2020-08-10 15:37:30 +02:00
tuxxy
662fddbeb7
Add basic skeleton for 'Datastore.query_by' method with tests
...
Ensure that queries only iterate over keys and not values
Query will now only process keys for unique records
2020-08-10 15:37:30 +02:00
tuxxy
cc0ca2ef91
Add a basic first implementation of the datastore with tests
...
Add tests for the datastore models, and change 'NotFound' to 'RecordNotFound'
2020-08-10 15:37:30 +02:00
tuxxy
184b3bf563
Create a base 'DatastoreRecord' class and models with tests
...
Move the base models to base.py and add more datastore tests
Change key structure to 'RecordType:RecordField:RecordID'
Eliminate the db module
2020-08-10 15:37:30 +02:00
Victoria
43718a49d5
Apply suggestions from code review #2142
...
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
Co-authored-by: David Núñez <david@nucypher.com>
2020-07-30 23:50:14 +03:00
vzotova
f2acc2adda
New command in CLI to increase value of specified sub-stake
2020-07-30 22:45:58 +03:00
vzotova
883f5350e4
Makes `Stake` validation stateless, new methods in `StakingEscrowAgent`, methods for increasing stake in `Staker`
2020-07-30 22:45:58 +03:00
jMyles
39f0dc4d6b
Some more debug-level logs instead of prints.
2020-07-26 19:20:47 -07:00
jMyles
029da78b04
Much more leeway in the number of nodes that have the map when we unblock (as this varies widely just on my laptop, depending on what else I'm running in the background.
2020-07-26 17:59:16 -07:00
jMyles
50ddae77a1
Lots of Character stoppages; these continually running loops went unnoticed before.
2020-07-26 17:58:39 -07:00
jMyles
d18b2e0834
Big fixup for the remaining errors blocking integration.learning.
2020-07-24 19:29:38 -07:00
jMyles
ad05f4a09a
This makes more sense, because you might block the main thread in a test, and then the Ursula can't process the request.
2020-07-22 16:18:29 -07:00
jMyles
9c577a5b96
Loading seednodes here is enough.
2020-07-22 16:17:49 -07:00
jMyles
d06deba742
Some debugging breadcrumbs for Ursula.
2020-07-22 16:16:30 -07:00
jMyles
1534bc07a9
Stopping Bob and Ursula at appropriate times.
2020-07-22 15:55:31 -07:00
jMyles
4a616d143d
Flagging test bob's origins for inspection on other threads.
2020-07-22 15:55:31 -07:00
jMyles
78abb8f6ed
Yanking some autouses in favor of usefixtures. [skip ci]
2020-07-18 13:09:08 -07:00
Kieran R. Prasch
85806613f1
Allow worker to attempt period commitment as part of it's initialization.
2020-07-17 12:30:11 -07:00
David Núñez
f5bee795d8
Merge pull request #2121 from mswilkison/worklock-terminology
...
Update WorkLock terminology
2020-07-15 17:46:44 +02:00
Victoria
e717b6d030
Apply suggestions from code review #2117
...
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
Co-authored-by: K Prasch <kieran@nucypher.com>
Co-authored-by: David Núñez <david@nucypher.com>
2020-07-14 12:04:35 +03:00
jMyles
679022c42a
Another test that was passing for the wrong reason. It now works regardless of whether the future Ursula is a hardcoded seednode or a user-specified one.
2020-07-09 22:26:10 -07:00
jMyles
fe908a1e83
Add a measure of maturation time; if this increases dramatically, that will represent a breakage.
2020-07-09 22:25:23 -07:00
vzotova
073cbf345e
Refactor sub-stake status and selecting sub-stake
2020-07-09 16:33:25 +03:00
David Núñez
10ef0a1d62
Rename WorkLock commands and options
2020-07-08 17:13:05 +02:00
vzotova
8f598f0df6
More integration tests for stake selection
2020-07-07 17:21:06 +03:00
vzotova
796f297e93
Refactor `StakeHolder.assimilate()`, now `StakeHolder` instances from configuration and from interactive mode are the same
2020-07-07 17:19:02 +03:00
vzotova
2d0be22dec
Apply suggestions from code review #2097
...
Co-authored-by: MacLane S Wilkison <maclane@nucypher.com>
Co-authored-by: David Núñez <david@nucypher.com>
Co-authored-by: K Prasch <kieran@nucypher.com>
2020-06-27 19:36:51 +03:00
jMyles
8c6cdf5145
Moving federated tests into their own module to keep the cache cleaner.
2020-06-25 23:18:14 -07:00
jMyles
31856340ad
This test needs to look for the checksum_address specifically, since this will be a stranger node or sprout now.
2020-06-25 19:29:27 -07:00
jMyles
d1025e9d15
Using lonely_ursula_maker in all the right places.
2020-06-25 19:29:03 -07:00
jMyles
179bd4ae37
Clarify each fleet state (because one of them is the result of the seednode loading).
2020-06-25 15:19:47 -07:00
jMyles
086ff1c3bb
This test is no longer relevant; the seednode tests cover this logic equally well.
2020-06-25 15:19:11 -07:00
vzotova
6c68fba65c
Small docs update for collecting reward
...
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
2020-06-25 20:57:21 +03:00
vzotova
0e46140e8f
Added `mint` command to CLI, added some warnings in `collecting-reward` command
2020-06-25 20:13:42 +03:00
vzotova
9897c0f93c
Fix agent mocking: use instance to hold mocked method instead of class
2020-06-25 20:08:27 +03:00
jMyles
169fffd41e
This entire test (and part of another) is no longer relevant, as Alice and Bob will learn about seednodes form their hardcoded domain list in such a scenario.
2020-06-24 19:27:52 -07:00
jMyles
81a4c623b3
This is a more acute test with a nonstandard domain, as it assures that the actual seednode logic is used.
2020-06-24 19:27:08 -07:00
jMyles
dbf910696a
Longer time allowance for this test; it will still almost certainly pass in the faster times on CI, but it's a pain to have it fail locally.
2020-06-24 19:26:42 -07:00
jMyles
3a2191248a
We no longer need to lower the parameter here; this test can pass in time with all 5000.
2020-06-24 14:38:44 -07:00
jMyles
1d75ced045
We need to fetch the actual Ursula from the cache to get the bytestring; this will be a sprout nowadays.
2020-06-23 16:00:35 -07:00
jMyles
935ac06d2c
A Character created from blank config will try to connect to seednodes without lonely.
2020-06-23 16:00:05 -07:00
jMyles
33f71f6e52
The number of known nodes might be a bit variable at this point; we're really concerned that he has only connected to 2.
2020-06-23 15:59:39 -07:00
jMyles
263aa1fab5
The first node in the fixture might not always be among the matching nodes.
2020-06-22 20:31:34 -07:00
jMyles
1b5917d728
Clarifying failure message; this makes it easier to understand why this test occasionally fails.
2020-06-22 20:31:34 -07:00
jMyles
97de268bd3
Merging the revised tests with the shim commit 31f001f2e
.
2020-06-22 20:31:33 -07:00
jMyles
1170c27b63
The connectivity problem will now manfiest itself as NotEnoughNodes, as Bob won't have learned in time to try to get the map.
2020-06-22 18:30:21 -07:00
jMyles
62b7ccd9bb
Fixing locations and formats.
2020-06-22 18:30:21 -07:00
jMyles
9045c3d7c1
Refining both test and threadpooling. Looking pretty good now.
2020-06-22 18:30:20 -07:00
jMyles
a36c82cfed
Honing in on the most important concurrent test assertions. This passes, but we can do even better.
2020-06-22 18:30:20 -07:00
jMyles
f21bc0cb72
This zany test actually passes - now to get that 30 second limit down.
2020-06-22 18:30:20 -07:00
jMyles
d301da3dae
It's slow, but it's a start. This test passes in about 9 seconds right now; subsequent commits will tune it.
2020-06-22 18:30:20 -07:00
jMyles
fb523765b8
Test using the sluggish middleware; this is the one that will require the concurrency from the last commit.
2020-06-22 18:30:20 -07:00
jMyles
7deab1242d
Mocking one layer out (setting policy) for these tests.
2020-06-22 18:30:20 -07:00
jMyles
1a6e3b09ed
Splitting test logic to show when the problem is with Bob or with Alice.
2020-06-22 18:30:20 -07:00
Kieran Prasch
5909c37dd1
Apply API and interface updates to for enrico file handling.
2020-06-18 08:55:21 -07:00
damon
6d79d8db7b
test fixes resulting from change in keys
2020-06-17 11:31:48 -07:00
damon
9d65b242e8
message -> plaintext
2020-06-17 00:08:48 -07:00
derekpierre
89911a87ab
Code cleanup. Fix typo in test
2020-06-09 08:50:18 -04:00
David Núñez
993b70d19a
Address RFCs to #2059
2020-06-01 16:45:09 +02:00
David Núñez
968a5979ed
Make test refund interactive to increase coverage. Fix a bug along the way!
2020-06-01 04:16:42 +02:00
David Núñez
e04247e5af
Make claiming test interactive to increase coverage
2020-06-01 04:09:55 +02:00
David Núñez
787d0ca2f2
Test claiming not available
2020-06-01 04:04:00 +02:00
David Núñez
24978b058a
Improve test for worklock bid time checks, to actually test the CLI layer
2020-06-01 03:26:07 +02:00
David Núñez
d42f838f7a
Test worklock account selection
2020-06-01 03:03:07 +02:00
David Núñez
80175c8751
Test interactive bid increasing
2020-05-31 19:51:10 +02:00
David Núñez
9745bdf602
Test interactive bidding. Extract some CLI strings to literature
2020-05-31 19:51:10 +02:00
David Núñez
b023e752b3
CLI tests: Correct user input, don't pass env vars
2020-05-31 19:51:10 +02:00
David Núñez
6e2ef561b5
Improve valid bid test: make it more a CLI/Bidder integration test
...
Also, input is supposed to be denominated in ETH
2020-05-31 03:24:56 +02:00
David Núñez
6384a198af
Mark some tests as FIXME as they are testing the Bidder, not the CLI
2020-05-31 03:24:53 +02:00
jMyles
31f001f2ed
This will be the basis of a merge commit in the rebase of these tests. One of them reactivates Vladimir; the other fixes the method for testing the presence of Treasure Maps.
2020-05-29 15:15:47 -07:00
Bogdan Opanchuk
8dbaf2b206
Use `capsys` instead of `stdout_trap`
2020-05-28 14:42:04 -07:00
Bogdan Opanchuk
ef9ab01a3a
Replace mocking click.prompt() and click.confirm() with mocking stdin/getpass.
2020-05-28 14:42:04 -07:00
Bogdan Opanchuk
8b9d559113
Separate YES/NO (w/o linebreak) and YES_ENTER/NO_ENTER (with linebreak) in test constants
2020-05-28 14:42:02 -07:00
Bogdan Opanchuk
844355b5fa
Remove a test with a duplciate name that never got executed
2020-05-28 14:40:39 -07:00
David Núñez
e1f59aab20
Fix test for nucypher worklock claim when bidder already claimed
2020-05-28 02:25:22 +02:00
Kieran Prasch
28cce2fccc
Reorganize tests into multiple suites.
2020-05-27 14:11:25 -07:00