Skip to content

Commit 62c0532

Browse files
authored
ci: Interop tests fixes and updates pending from #3331 (#3360)
1 parent d3dc398 commit 62c0532

File tree

8 files changed

+22
-29
lines changed

8 files changed

+22
-29
lines changed

.github/workflows/interop-test.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ concurrency:
1212
jobs:
1313
build-ping-container:
1414
name: Build Ping interop container
15-
runs-on: ubuntu-latest
15+
runs-on: ubuntu-22.04
1616
steps:
1717
- uses: actions/checkout@v3
1818
with:
@@ -24,18 +24,23 @@ jobs:
2424
- name: Install Protoc
2525
run: sudo apt-get install protobuf-compiler
2626
- name: Build image
27-
working-directory: ./test-plans
28-
run: make
27+
working-directory: ./interop-tests
28+
run: |
29+
cargo build --release -p interop-tests
30+
mkdir -p target/release/
31+
cp ../target/release/ping target/release
32+
docker build -t rust-libp2p-head .
33+
docker image save -o ping-image.tar rust-libp2p-head
2934
- name: Upload ping versions info
3035
uses: actions/upload-artifact@v3
3136
with:
3237
name: ping-versions
33-
path: ./test-plans/ping-versions.json
38+
path: ./interop-tests/ping-versions.json
3439
- name: Upload image tar
3540
uses: actions/upload-artifact@v3
3641
with:
3742
name: ping-image
38-
path: ./test-plans/ping-image.tar
43+
path: ./interop-tests/ping-image.tar
3944
run-multidim-interop:
4045
name: Run multidimensional interoperability tests
4146
needs: build-ping-container

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ members = [
166166
"protocols/request-response",
167167
"swarm",
168168
"swarm-derive",
169-
"test-plans",
169+
"interop-tests",
170170
"transports/deflate",
171171
"transports/dns",
172172
"transports/noise",

test-plans/Cargo.toml renamed to interop-tests/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ publish = false
77
[dependencies]
88
anyhow = "1"
99
async-trait = "0.1.58"
10+
either = "1.8.0"
1011
env_logger = "0.9.0"
1112
futures = "0.3.1"
1213
if-addrs = "0.7.0"
14+
libp2p = { path = "../", default_features = false, features = ["websocket", "quic", "mplex", "yamux", "tcp", "tokio", "ping", "noise", "tls", "dns", "rsa", "macros", "webrtc"] }
1315
log = "0.4"
16+
rand = "0.8.5"
1417
redis = { version = "0.22.1", features = ["tokio-native-tls-comp", "tokio-comp"] }
18+
strum = { version = "0.24.1", features = ["derive"] }
1519
tokio = { version = "1.24.1", features = ["full"] }
1620

17-
libp2p = { path = "../", default_features = false, features = ["websocket", "quic", "mplex", "yamux", "tcp", "tokio", "ping", "noise", "tls", "dns", "rsa", "macros", "webrtc"] }
18-
rand = "0.8.5"
19-
strum = { version = "0.24.1", features = ["derive"] }
20-
either = "1.8.0"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:latest
1+
FROM ubuntu:22.04
22
COPY target/release/ping /usr/local/bin/testplan
33
ENV RUST_BACKTRACE=1
44
ENTRYPOINT ["testplan"]

test-plans/README.md renamed to interop-tests/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# test-plans test implementation
1+
# Interop tests implementation
22

3-
This folder defines the implementation for the test-plans interop tests.
3+
This folder defines the implementation for the interop tests.
44

55
# Running this test locally
66

File renamed without changes.

test-plans/src/bin/ping.rs renamed to interop-tests/src/bin/ping.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::time::Duration;
44

55
use anyhow::{Context, Result};
66
use either::Either;
7-
use env_logger::Env;
7+
use env_logger::{Env, Target};
88
use futures::{AsyncRead, AsyncWrite, StreamExt};
99
use libp2p::core::muxing::StreamMuxerBox;
1010
use libp2p::core::transport::Boxed;
@@ -177,7 +177,9 @@ async fn main() -> Result<()> {
177177
let mut conn = client.get_async_connection().await?;
178178

179179
log::info!("Running ping test: {}", swarm.local_peer_id());
180-
env_logger::Builder::from_env(Env::default().default_filter_or("info")).init();
180+
env_logger::Builder::from_env(Env::default().default_filter_or("info"))
181+
.target(Target::Stdout)
182+
.init();
181183

182184
log::info!(
183185
"Test instance, listening for incoming connections on: {:?}.",

test-plans/Makefile

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)