Closed NickEckardt closed 3 years ago
@aarshkshah1992 can you take a look at this when you have a chance and help shepherd getting the tests in so we can more reliably update the examples?
@jacobheun Sure.
@NickEckardt The binary file libp2p-host/libp2p-host
shouldn't be committed.
@eliasmarkc Good catch, fixed.
@NickEckardt Thank you for your PR. The work will be incorporated in a follow-up PR for https://github.com/libp2p/go-libp2p-examples/pull/195 once we have fixed the examples.
Wrote some rudimentary tests to ensure examples work. The primary goal here is to provide a way to compile and run all examples and check for compile or runtime errors. Tests for correctness of the examples will still need to be done. For example, the chat-with-rendezvous test passes, however chat-with-rendezvous does not work in its current state.
Also, the libp2p-host test fails since libp2p-host currently suffers from a runtime error. Removing references to quic fixes the problem and the test passes. A better solution would be to get quic working instead of just removing it.
Note: This is my first time writing code with go, please let me know if my code isn't idiomatic or if I'm using the testing framework wrong.