Skip to content

Commit 814eb41

Browse files
authored
test: add muxers dir (#1868)
1 parent 5d98baa commit 814eb41

File tree

5 files changed

+24
-12
lines changed

5 files changed

+24
-12
lines changed

tests/muxers/test_all.nim

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Nim-LibP2P
2+
# Copyright (c) 2023-2025 Status Research & Development GmbH
3+
# Licensed under either of
4+
# * Apache License, version 2.0 ([LICENSE-APACHE](LICENSE-APACHE))
5+
# * MIT license ([LICENSE-MIT](LICENSE-MIT))
6+
# at your option.
7+
# This file may not be copied, modified, or distributed except according to
8+
# those terms.
9+
10+
{.used.}
11+
12+
import test_mplex, test_yamux_header, test_yamux

tests/testmplex.nim renamed to tests/muxers/test_mplex.nim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
{.used.}
2-
31
# Nim-LibP2P
42
# Copyright (c) 2023-2025 Status Research & Development GmbH
53
# Licensed under either of
@@ -9,9 +7,11 @@
97
# This file may not be copied, modified, or distributed except according to
108
# those terms.
119

10+
{.used.}
11+
1212
import strformat, random, sequtils, chronos, nimcrypto/utils, chronicles, stew/byteutils
1313
import
14-
../libp2p/[
14+
../../libp2p/[
1515
errors,
1616
stream/connection,
1717
stream/bufferstream,
@@ -25,7 +25,7 @@ import
2525
vbuffer,
2626
varint,
2727
]
28-
import ./tools/[unittest, trackers, futures, bufferstream, compare]
28+
import ../tools/[unittest, trackers, futures, bufferstream, compare]
2929

3030
suite "Mplex":
3131
teardown:

tests/testyamux.nim renamed to tests/muxers/test_yamux.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
{.used.}
1111

1212
import sugar, chronos
13-
import ../libp2p/[stream/connection, stream/bridgestream, muxers/yamux/yamux]
14-
import ./tools/[unittest, futures]
13+
import ../../libp2p/[stream/connection, stream/bridgestream, muxers/yamux/yamux]
14+
import ../tools/[unittest, futures]
1515

16-
include ../libp2p/muxers/yamux/yamux
16+
include ../../libp2p/muxers/yamux/yamux
1717

1818
proc newBlockerFut(): Future[void] {.async: (raises: [], raw: true).} =
1919
newFuture[void]()

tests/testyamuxheader.nim renamed to tests/muxers/test_yamux_header.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
{.used.}
1111

12-
import ../libp2p/[stream/bufferstream, stream/lpstream, muxers/yamux/yamux]
13-
import ./tools/[unittest]
12+
import ../../libp2p/[stream/bufferstream, stream/lpstream, muxers/yamux/yamux]
13+
import ../tools/[unittest]
1414

15-
include ../libp2p/muxers/yamux/yamux
15+
include ../../libp2p/muxers/yamux/yamux
1616

1717
proc readBytes(bytes: array[12, byte]): Future[YamuxHeader] {.async.} =
1818
let bs = BufferStream.new()

tests/test_all.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import ./tools/test_all
1313
import ./utils/test_all
1414
import ./crypto/test_all
1515
import ./stream/test_all
16+
import ./muxers/test_all
1617
import ./transports/test_all
1718
import ./discovery/test_all
1819
import ./kademlia/test_all
@@ -24,8 +25,7 @@ import
2425
testvarint, testminprotobuf, testmultibase, testmultihash, testmultiaddress, testcid,
2526
testpeerid, testsigned_envelope, testrouting_record, testnameresolve, testmultistream,
2627
testobservedaddrmanager, testconnmngr, testswitch, testpeerinfo, testpeerstore,
27-
testmplex, testyamux, testyamuxheader, testautorelay, testhpservice, testutility,
28-
testwildcardresolverservice
28+
testautorelay, testhpservice, testutility, testwildcardresolverservice
2929

3030
when defined(libp2p_autotls_support):
3131
import testautotls

0 commit comments

Comments
 (0)