Skip to content

Commit

Permalink
test: Introduce iroh-test with common logging infrastructure (#1365)
Browse files Browse the repository at this point in the history
## Description

This code was copy-pasted around too much.  This takes a simple and
clean approach to this by creating a new crate which is used as a
dev-dependency of all the other crates.

The upside is there is no messing about with cargo features and
delicate matching versions.

The main downside is that it can not provide testing utilities which
build on the code in the other crates.  Most notable this is currently
the testing derp server.


## Notes & open questions

This skirts around the tricky bits of adding such a common module: The
testing derp server is still copy-pasted around.  I think this is
fine, because solving that is ugly.  Let's see if any other code ends
up in this crate or if the majority needs a more complicated solution
anyway.

This also doesn't introduce a general *published* iroh-common crate
(or whatever it would be named).  This might also be useful but
affects the public API and introduces other questions.  There's no
harm in considering this to be an entirely independent problem and to
later add such a module as well as this one.


## Change checklist

- [x] Self-review.
- [x] Documentation updates if relevant.
- [x] Tests if relevant.
  • Loading branch information
flub authored Aug 24, 2023
1 parent 87b0ed9 commit 1b7c012
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
14 changes: 12 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[workspace]
members = [
"iroh",
"iroh-net",
"iroh-bytes",
"iroh-gossip",
"iroh-metrics",
"iroh-net",
"iroh-test",
]

[profile.release]
Expand Down

0 comments on commit 1b7c012

Please sign in to comment.