Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for libp2p backend in integration tests #287

Closed
wants to merge 1 commit into from

Conversation

zeegomo
Copy link
Contributor

@zeegomo zeegomo commented Aug 2, 2023

Ideally, we should test both version in integrations tests, I think it's possible to set up a run for each of the backends right @bacv ?

@bacv
Copy link
Member

bacv commented Aug 3, 2023

I think it's possible to set up a run for each of the backends

Yes, integration job builds nomos-node and then runs cargo test with it. With new feature flags, these steps will be duplicated for waku and libp2p.

I can add updated jenkinsfile to this PR or create a new one, which do you prefer?

@@ -8,12 +8,17 @@ use consensus_engine::overlay::{FlatOverlaySettings, RoundRobin};
use consensus_engine::NodeId;
use nomos_consensus::{CarnotInfo, CarnotSettings};
use nomos_http::backends::axum::AxumBackendSettings;
#[cfg(feature = "libp2p")]
use nomos_libp2p::Multiaddr;
use nomos_libp2p::SwarmConfig;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably needs to be in one line for the feature flag.
use nomos_libp2p::{Multiaddr, SwarmConfig};

@danielSanchezQ
Copy link
Collaborator

I think it's possible to set up a run for each of the backends

Yes, integration job builds nomos-node and then runs cargo test with it. With new feature flags, these steps will be duplicated for waku and libp2p.

I can add updated jenkinsfile to this PR or create a new one, which do you prefer?

wouldn't the all-features flag work? 🤔

@bacv
Copy link
Member

bacv commented Aug 3, 2023

wouldn't the all-features flag work?

It won't work for building two separate binary files. It might work for cargo test, but in order to run integration tests sequentially, every test is executed with a dedicated cargo test command line.

@zeegomo
Copy link
Contributor Author

zeegomo commented Aug 3, 2023

wouldn't the all-features flag work?

Backends are mutually exclusive, we actually want duplication here so that we run one time with waku and one time with libp2p.
all-features when building is not possible and in tests would only run each test once (i.e. with only one backend)

@zeegomo
Copy link
Contributor Author

zeegomo commented Aug 7, 2023

Right now we use all-features in tests which is causing the test to fail as in the binary/tests waku/libp2p are mutually exclusive features. Can we merge #290 first?

@zeegomo zeegomo closed this Aug 7, 2023
@jakubgs jakubgs deleted the libp2p-tests-2 branch February 15, 2024 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants