Commit Graph

143 Commits

Author SHA1 Message Date
Ted Blackman
fc5598718b Merge branch 'develop' into next/kelvin/412 2023-06-06 12:50:11 -04:00
yosoyubik
385ede5c89 tests: remove misleading comment 2023-06-05 15:43:55 +02:00
yosoyubik
7b15f5c022 ames: fix tests 2023-06-05 11:41:39 +02:00
yosoyubik
6696f587be Merge branch 'next/kelvin/412' into i/6103/abet-pure 2023-06-01 17:46:36 +02:00
yosoyubik
8b518f4bfe Merge branch 'develop' into next/kelvin/412 2023-06-01 17:39:42 +02:00
Joe Bryan
e92878d778 test: adds failing multi-byte-glyph sanity 2023-05-31 14:32:39 -04:00
Tinnus Napbus
0105be6459 Merge branch 'develop' into tinnus/local-provenance 2023-05-31 12:52:53 +12:00
Tinnus Napbus
df53148183 tests: change sock to sack 2023-05-30 23:38:26 +12:00
yosoyubik
96e3bdcf11 Merge branch 'develop' into i/6103/abet-pure 2023-05-30 10:38:39 +02:00
yosoyubik
ff0584807a ames: fix grq tests 2023-05-30 10:33:13 +02:00
yosoyubik
4f27ac7329 ames: use %deep task in test-nack 2023-05-30 10:33:13 +02:00
Joe Bryan
d4b900bf3f
Merge pull request #6612 from urbit/i/6611/lose-boon
ames: correctly %lose a %boon we crashed on
2023-05-26 11:19:57 -04:00
Joe Bryan
6443e80bdc tests: adds failing misordered fine response test 2023-05-24 13:00:44 -04:00
Joe Bryan
1e6899660b test: removes unused arms from fine tests, factors out duplicate paths 2023-05-24 12:46:42 -04:00
fang
30cde41800
tests: add ames test for crashing on %boon
To detect regressions of the bug d8e11b6 fixed.
2023-05-23 22:12:21 +02:00
fang
bf64e94ca3
tests: expand eyre eauth tests
For the server case, we add tests for http-first finalization, incorrect
eauth tokens, attempt expiration, client abort signalling, and client
deletion requests.

For the client case, we add a test for approving eauth attempts without
being locally authenticated.

To this end, we refactor the layout of the eauth tests. The +eauth core
now contains the tasks/gifts to be handled by the client/server, but no
longer does move checking. This happens within the test arms only. This
way, we may trivially re-run parts of the eauth flow under different
conditions.
2023-05-23 20:32:24 +02:00
Tinnus Napbus
2ba8e45fd2 tests: fix tests for provenance 2023-05-23 01:55:55 +12:00
fang
a6acfe3c93
tests: add based happy-path eauth tests 2023-05-19 19:25:04 +02:00
fang
3347e84811
eyre: rename authentication-state to auth
Only in the $server-state type, the lull typename remains unchanged (for
now). "authentication-state" is just such a mouthful!
2023-05-19 11:32:07 +02:00
fang
dd41df7d7c
tests: make eyre tests build & succeed again 2023-05-19 11:09:11 +02:00
fang
b8ff52d79a
tests: remove trailing whitespace in eyre tests 2023-05-16 21:47:23 +02:00
fang
637992475b
eyre: refactor guest name generation
Concatenating before we truncate, instead of truncating the entropy by
itself, is slightly simpler.

Because this slightly changes the naming algorithm, we must update the
eyre tests to match.
2023-05-16 21:46:48 +02:00
Philip Monk
c3dc248b30 Merge remote-tracking branch 'origin/m/the-open-eyre' into philip/mare 2023-05-11 11:19:25 -07:00
fang
466fc0b63b
eyre: pass session-id+identity into auth handling
This lets it also clean up guest sessions created just for the login
request, and lets us display the current guest identity on the login
page.
2023-05-09 15:10:14 +02:00
yosoyubik
b154c62fdc ames, tests: remove extraneous comments 2023-05-09 11:43:54 +02:00
Philip Monk
8910e12f67 eyre: refactor tests
This shaves off 1000 lines of testing code while maintaining the same
tests.  It reduces boilerplate by introducing "mare", a monad for
testing Eyre.  It's very simple (just maintains the current state of
Eyre and the current time), but it's easier to build helper functions in
this form, and that reduces the immense quantities of copy-and-paste
that were in the old tests.  What's there now could surely be improved
further, but I think this is a good start.

The underlying mare machinery is not really specific to Eyre, so it
would be straightforward to apply this strategy to other vanes.  The
work is in creating appropriate helper functions for each vane.  Eyre is
undergoing work, so that's the only one I've changed here.  Further,
it's not clear that this is the ultimate solution to unit testing vanes.
The resulting code is IMO clearer than before, but I wouldn't say it's
*clear*.
2023-05-08 20:40:28 -07:00
fang
67799c77e0
tests: update eyre tests for guest sessions
Unauthenticated requests now also create sessions. This affects most
HTTP request handling tests.

The situation here is not ideal, and worsening over time. Worth spending
some time to think about how to best refactor the Eyre tests to make
them more manageable and easier to maintain.
2023-05-08 19:10:00 +02:00
yosoyubik
f53fee723a ames: defer mutual calls between |pump and |sink
|pump and |sink call into each other in three places
related to nacks and naxplanations (sending a nack,
notifying the |pump of a naxplanation, or dropping a
nack from the |sink). This intra calls are making implicit
updates to more parts of the state than the core should
manage. To avoid that we emit a move to %arvo, encoded
as an %ames plea, to handle that in the next event.
2023-05-08 15:28:13 +02:00
yosoyubik
6213e0bbb3 ames: move +bind-duct to peer-core 2023-05-05 13:06:17 +02:00
~wicrum-wicrun
99ca67db7f tests: remove defunct deq test 2023-05-02 17:02:58 +02:00
~wicrum-wicrun
6355b84d35 tests: use @uxyowl instead of @uxmeow 2023-04-24 19:56:24 +02:00
~wicrum-wicrun
738b17d0ca tests: remove .siz from $meow 2023-04-24 17:48:00 +02:00
yosoyubik
fc22926ed6 tests: fix rift/life in ames/fine tests 2023-04-23 09:40:57 +02:00
Joe Bryan
79b17f03b3 tests: shrink/silence trace hints 2023-04-23 02:02:15 -04:00
Joe Bryan
36821967be tests: fixes $wail serialization in fine tests 2023-04-23 02:01:50 -04:00
Ted Blackman
84cd948f30 Merge branch 'next/kelvin/413' into i/5788/remote-scry 2023-04-22 14:33:20 -04:00
yosoyubik
d259656e29 lull: clean up remote scry namespace missmatches
(note: first pass, subject to change)
2023-04-22 10:57:49 +02:00
Joe Bryan
3eeca101ac test: fixes ames tests (broken due to $roar refactoring) 2023-04-21 13:16:59 -04:00
yosoyubik
2bcfd7599a ames: fix %fine tests to account for updated %tune 2023-04-21 17:54:01 +02:00
~wicrum-wicrun
93e6589df2 tests: zero out signatures in fine requests 2023-04-20 19:40:07 +02:00
yosoyubik
873de61269 ames: give %miss to all listeners on %keen cancel
%spider will send a %yawn task to ames if a thread fails
or stops. if the thread is done, it will delete the scry
from its state without notifying %ames
2023-04-19 11:03:11 +02:00
Joe Bryan
2029fe7b23 tests: removes userspace deq import 2023-04-18 11:05:03 -04:00
yosoyubik
e0c0470a6e tests: fix %fine response signature validation 2023-04-18 09:12:35 +02:00
yosoyubik
07a6b2e06f tests: check CI with failing signature test
This test is failing locally but the signature comes from
+make-meow:etch-hunk:ames which should be the
expected value for the test -- compare result with CI
2023-04-18 05:33:05 +02:00
Joe Bryan
790a0de292 ames: fix move clobbering in +fi-done 2023-04-17 18:29:44 -04:00
Joe Bryan
50f5abc138 tests: removes spurious vases from %tune 2023-04-17 17:47:03 -04:00
yosoyubik
03b3d0b3f4 tests: fix /tests/sys/fine 2023-04-17 16:41:53 +02:00
yosoyubik
1d91bb5e33 ames: first pass a %fine unit tests 2023-04-17 14:15:35 +02:00
Ted Blackman
f3d2df087a
Merge pull request #6463 from ashelkovnykov/json-new
zuse: changes in preparation for JSON jets
2023-04-13 11:58:55 -04:00
fang
4bc88f2825
tests: patch eyre tests for channel modes
Since the tests call arms from eyre directly, these had to be updated
alongside it, to now specify the channel mode in light of which the
request should be parsed.

Includes smoke tests for jam-mode channels.
2023-04-12 19:33:05 +02:00
Alex Shelkovnykov
e61d84d57b Replace +en:json:html code with cord version
Encode JSON to cord instead of tape. Code copied from @joemfb 's
version.
2023-04-11 14:59:15 -06:00
Alex Shelkovnykov
ac1a0ffdee Change JSON parser arms to match |base16:html 2023-04-11 14:59:15 -06:00
Alex Shelkovnykov
345c4a8ae5 Refactor unit tests for JSON decoding/encoding
The unit tests for de-json:html and en-json:html in zuse.hoon were
copied from the JSON Test Suite (https://github.com/nst/JSONTestSuite).
While a good test suite if usable as-is, it has a lot of problems with
it, namely: inconsistent test names; repeated tests; and mixing tests
for multiple cases into one file. Since the tests need to be manually
added to Urbit anyway, this commit uses the opportunity to clean up the
test suite by making the following changes:
- Renaming tests to use a consistent naming scheme
- Removing repetetive test cases
- Splitting multi-case tests into multiple single-purpose tests
2023-04-11 14:59:15 -06:00
yosoyubik
bbbb4934b9 test: fix /sys/zuse/balk 2023-04-07 20:44:31 +02:00
yosoyubik
af050caf0f test: make /tests/sys/grq pass after remote scry
To conform with the new new fields (req and sam) in .shot
(note: it would be to have helpers that create the serialize blobs)
2023-04-07 19:13:45 +02:00
yosoyubik
5f2eb383c7 tests: make /test/sys/ames pass 2023-04-06 13:44:45 +02:00
yosoyubik
2545e05c7a lull: implement +wyt for getting the size of a |deq 2023-03-22 12:26:50 +01:00
yosoyubik
dd0f35c8ad Merge branch 'm/contdist-and-behn' into i/5788/remote-scry 2023-03-21 18:01:17 +01:00
yosoyubik
3963b0a951 ames: fix test-nack
previously we were acking the nack-trace message (adding a %send move)
before notifying the message-pump with a %near task. Now, due to the
refactoring we invert the order of those moves. This seems safe but will
determine with livenet testing
2023-02-22 14:45:44 +01:00
Ted Blackman
08abd0807b
Merge pull request #6334 from urbit/i/6333/fix-grq-test
ames: fix failing GRQ test
2023-02-17 09:12:07 -05:00
yosoyubik
12b79884e7 Merge branch 'yu/fix-grq-test' into i/6333/fix-grq-test 2023-02-16 10:01:18 +01:00
pkova
49a24647da eyre: revert inclusion of HttpOnly header for now 2023-02-13 20:58:59 +02:00
pkova
d8ff95db84 eyre: add /~/name endpoint 2023-02-13 14:26:54 +02:00
fang
92066f3a33
Merge branch 'develop' into m/http-auth-tokens 2023-02-06 19:44:01 +01:00
DaneBettis
cb1ce57475 added %meme tests to hints.hoon 2023-02-02 15:15:53 +00:00
Philip Monk
83b39e82a7 Merge remote-tracking branch 'origin/next/arvo' into m/detest 2023-01-18 18:01:59 -07:00
fang
e888960370
tests: move to root, out of pkg/arvo
Including these in pkg/arvo has caused many minor problems over the
years. We don't want to include them in releases, but this often meant
excluding them manually, which was error-prone.

Here, we move them out of /pkg/arvo/tests and into /tests. CI will have
to be updated to match, since we'll still want to include tests there.
2023-01-18 16:50:42 +01:00
benjamin-tlon
c86879e833
Nix Build + Monorepo Structure (#1196) 2019-03-04 16:43:53 -08:00
benjamin-tlon
93dbe1df26
Remove trailing whitespace and enforce in CI. (#1212) 2019-02-25 13:35:12 -08:00
Joe Bryan
47c7339db2 simplifies loom init and checkpoint restore 2019-02-04 18:23:01 -05:00
Joe Bryan
ee835ee87f removes temporary u3r_mug tests 2019-01-15 23:58:16 -05:00
Ted Blackman
e815ad4be7 WIP refactored but still dying 2019-01-15 19:42:40 -08:00
Ted Blackman
63ccf3ad7e WIP still dying 2019-01-15 19:29:11 -08:00
Ted Blackman
b105e5e6db WIP testing and printing 2019-01-15 18:58:28 -08:00
Joe Bryan
9fae727179 fix heap allocation in hash_tests 2019-01-11 14:01:02 -05:00
Joe Bryan
a82a68df21 skip free() in tests 2019-01-10 19:00:50 -05:00
Joe Bryan
cd757b39b9 revises u3r_mug_chub and u3r_mug_words to match u3r_mug_bytes 2019-01-10 18:47:16 -05:00
Joe Bryan
a50c21e3cf identifies hash test failure printfs 2019-01-10 18:43:03 -05:00
Joe Bryan
1d1a259f31 removes old u3r_mug*, switches u3r_mur* to u3r_mug* 2019-01-08 18:13:25 -05:00
Joe Bryan
2240edd354 adds basic tests for u3r_mur 2019-01-07 23:31:32 -05:00
Joe Bryan
19e588e503 removes old kjet implementation file 2018-11-13 13:43:51 -05:00
Joe Bryan
fc665dce04 configures/builds/activates (failing) memory tests 2018-11-13 13:43:51 -05:00
Ted Blackman
ef44cba54f _test_cache_replace_value() 2017-11-09 08:35:05 -08:00
Paul Driver
f0c410855f move arm in trim_node when not in bitmap 2017-11-09 08:35:05 -08:00
Ted Blackman
745cff44ad WIP debugging; _ch_skip_slot() and tests 2017-11-09 08:35:05 -08:00
Paul Driver
f6d30a0700 stash 2017-11-09 08:35:05 -08:00
Paul Driver
311b0b00f8 stash 2017-11-09 08:35:05 -08:00
Ted Blackman
d5c7a458c1 WIP more debugging and printfs 2017-11-09 08:35:05 -08:00
Ted Blackman
56c5fba1e5 WIP fixed missed slot mutation. Now dies on testcase 256 2017-11-09 08:35:05 -08:00
Ted Blackman
447ae75d46 WIP debugging. Added node_deflate() function. 2017-11-09 08:35:05 -08:00
Ted Blackman
a9492c2eef WIP debugging. Added print routines 2017-11-09 08:35:05 -08:00
Ted Blackman
e16b8ee9dc hashtable tests and associated makefile changes 2017-11-09 08:35:05 -08:00
Philip C Monk
9edda1bb73 descriptive names for c files
fixes #294
2015-06-23 21:29:11 -04:00