From ebecd4a9969518672058fa50b74343c50c650b32 Mon Sep 17 00:00:00 2001 From: Marcin Szamotulski Date: Mon, 4 Nov 2024 11:01:46 +0100 Subject: [PATCH] ouroboros-network-protocols:testlib: renamed Utils module `Test.Ouroboros.Network.Testing.Utils -> Test.Ouroboros.Network.Protocol.Utils` --- ouroboros-network-protocols/CHANGELOG.md | 1 + .../ouroboros-network-protocols.cabal | 2 +- .../testlib/Ouroboros/Network/Protocol/BlockFetch/Test.hs | 2 +- .../testlib/Ouroboros/Network/Protocol/ChainSync/Test.hs | 2 +- .../testlib/Ouroboros/Network/Protocol/Handshake/Test.hs | 5 ++--- .../testlib/Ouroboros/Network/Protocol/KeepAlive/Test.hs | 2 +- .../Ouroboros/Network/Protocol/LocalStateQuery/Test.hs | 2 +- .../Ouroboros/Network/Protocol/LocalTxMonitor/Test.hs | 2 +- .../Ouroboros/Network/Protocol/LocalTxSubmission/Test.hs | 2 +- .../testlib/Ouroboros/Network/Protocol/PeerSharing/Test.hs | 2 +- .../testlib/Ouroboros/Network/Protocol/TxSubmission2/Test.hs | 2 +- .../Test/Ouroboros/Network/{Testing => Protocol}/Utils.hs | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) rename ouroboros-network-protocols/testlib/Test/Ouroboros/Network/{Testing => Protocol}/Utils.hs (98%) diff --git a/ouroboros-network-protocols/CHANGELOG.md b/ouroboros-network-protocols/CHANGELOG.md index a28097afc6..d2b83b8cfd 100644 --- a/ouroboros-network-protocols/CHANGELOG.md +++ b/ouroboros-network-protocols/CHANGELOG.md @@ -4,6 +4,7 @@ ### Breaking changes +* Renamed `Test.Ouroboros.Network.Testing.Utils -> Test.Ouroboros.Network.Protocol.Utils` * Removed deprecated APIs: * `chainSyncClientNull` * `localStateQueryClientNull` diff --git a/ouroboros-network-protocols/ouroboros-network-protocols.cabal b/ouroboros-network-protocols/ouroboros-network-protocols.cabal index d36d2743ed..a84f14edf8 100644 --- a/ouroboros-network-protocols/ouroboros-network-protocols.cabal +++ b/ouroboros-network-protocols/ouroboros-network-protocols.cabal @@ -172,7 +172,7 @@ library testlib Test.ChainProducerState Test.Data.CDDL Test.Data.PipeliningDepth - Test.Ouroboros.Network.Testing.Utils + Test.Ouroboros.Network.Protocol.Utils build-depends: QuickCheck, diff --git a/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/BlockFetch/Test.hs b/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/BlockFetch/Test.hs index 6d75c7daf3..b2bbc85d0b 100644 --- a/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/BlockFetch/Test.hs +++ b/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/BlockFetch/Test.hs @@ -45,7 +45,7 @@ import Ouroboros.Network.Protocol.BlockFetch.Type import Test.Data.PipeliningDepth (PipeliningDepth (..)) import Test.ChainGenerators (TestChainAndPoints (..)) -import Test.Ouroboros.Network.Testing.Utils (prop_codec_cborM, +import Test.Ouroboros.Network.Protocol.Utils (prop_codec_cborM, prop_codec_valid_cbor_encoding, splits2, splits3) import Test.QuickCheck diff --git a/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/ChainSync/Test.hs b/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/ChainSync/Test.hs index f36b6b9d7e..9d1af9b738 100644 --- a/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/ChainSync/Test.hs +++ b/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/ChainSync/Test.hs @@ -53,7 +53,7 @@ import Test.Data.PipeliningDepth (PipeliningDepth (..)) import Test.ChainGenerators () import Test.ChainProducerState (ChainProducerStateForkTest (..)) -import Test.Ouroboros.Network.Testing.Utils (prop_codec_cborM, +import Test.Ouroboros.Network.Protocol.Utils (prop_codec_cborM, prop_codec_valid_cbor_encoding, splits2, splits3) import Test.QuickCheck hiding (Result) diff --git a/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/Handshake/Test.hs b/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/Handshake/Test.hs index c119788a37..151bfa67e4 100644 --- a/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/Handshake/Test.hs +++ b/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/Handshake/Test.hs @@ -45,7 +45,7 @@ import Network.Mux.Types (MiniProtocolDir (..), MiniProtocolNum (..), import Network.TypedProtocol.Codec import Network.TypedProtocol.Proofs -import Test.Ouroboros.Network.Testing.Utils (prop_codec_cborM, +import Test.Ouroboros.Network.Protocol.Utils (prop_codec_cborM, prop_codec_valid_cbor_encoding, splits2, splits3) import Ouroboros.Network.Channel @@ -165,8 +165,7 @@ tests = -- wrongly encoded data (protocol version & associated version data mismatch) -- --- | --- Testing version number +-- | Testing version number -- data VersionNumber = Version_0 diff --git a/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/KeepAlive/Test.hs b/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/KeepAlive/Test.hs index 481f4f603a..55ee3cff6b 100644 --- a/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/KeepAlive/Test.hs +++ b/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/KeepAlive/Test.hs @@ -34,7 +34,7 @@ import Ouroboros.Network.Protocol.KeepAlive.Examples import Ouroboros.Network.Protocol.KeepAlive.Server import Ouroboros.Network.Protocol.KeepAlive.Type -import Test.Ouroboros.Network.Testing.Utils (prop_codec_valid_cbor_encoding, +import Test.Ouroboros.Network.Protocol.Utils (prop_codec_valid_cbor_encoding, splits2, splits3) diff --git a/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/LocalStateQuery/Test.hs b/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/LocalStateQuery/Test.hs index 4019fde314..794476d74d 100644 --- a/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/LocalStateQuery/Test.hs +++ b/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/LocalStateQuery/Test.hs @@ -51,7 +51,7 @@ import Ouroboros.Network.Protocol.LocalStateQuery.Server import Ouroboros.Network.Protocol.LocalStateQuery.Type import Test.ChainGenerators () -import Test.Ouroboros.Network.Testing.Utils +import Test.Ouroboros.Network.Protocol.Utils import Test.QuickCheck as QC hiding (Result) import Test.Tasty (TestTree, testGroup) diff --git a/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/LocalTxMonitor/Test.hs b/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/LocalTxMonitor/Test.hs index c81d8eebd3..95ce2789cb 100644 --- a/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/LocalTxMonitor/Test.hs +++ b/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/LocalTxMonitor/Test.hs @@ -36,7 +36,7 @@ import Ouroboros.Network.Protocol.LocalTxMonitor.Server import Ouroboros.Network.Protocol.LocalTxMonitor.Type import Test.ChainGenerators () -import Test.Ouroboros.Network.Testing.Utils (prop_codec_cborM, +import Test.Ouroboros.Network.Protocol.Utils (prop_codec_cborM, prop_codec_valid_cbor_encoding, splits2, splits3) import Test.QuickCheck hiding (Result) import Test.Tasty (TestTree, testGroup) diff --git a/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/LocalTxSubmission/Test.hs b/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/LocalTxSubmission/Test.hs index 8228acbcd7..2a69c81ac0 100644 --- a/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/LocalTxSubmission/Test.hs +++ b/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/LocalTxSubmission/Test.hs @@ -44,7 +44,7 @@ import Ouroboros.Network.Protocol.LocalTxSubmission.Server import Ouroboros.Network.Protocol.LocalTxSubmission.Type import Test.Data.CDDL (Any (..)) -import Test.Ouroboros.Network.Testing.Utils (prop_codec_cborM, +import Test.Ouroboros.Network.Protocol.Utils (prop_codec_cborM, prop_codec_valid_cbor_encoding, splits2, splits3) import Control.DeepSeq diff --git a/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/PeerSharing/Test.hs b/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/PeerSharing/Test.hs index 2f3533176e..fef0ceca1a 100644 --- a/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/PeerSharing/Test.hs +++ b/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/PeerSharing/Test.hs @@ -36,7 +36,7 @@ import Ouroboros.Network.Protocol.PeerSharing.Examples (peerSharingClientCollect, peerSharingServerReplicate) import Ouroboros.Network.Protocol.PeerSharing.Server (peerSharingServerPeer) import Ouroboros.Network.Protocol.PeerSharing.Type -import Test.Ouroboros.Network.Testing.Utils (prop_codec_cborM, +import Test.Ouroboros.Network.Protocol.Utils (prop_codec_cborM, prop_codec_valid_cbor_encoding, splits2, splits3) import Test.QuickCheck.Function (Fun, applyFun) import Test.Tasty (TestTree, testGroup) diff --git a/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/TxSubmission2/Test.hs b/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/TxSubmission2/Test.hs index 41532fb7eb..90235db981 100644 --- a/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/TxSubmission2/Test.hs +++ b/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/TxSubmission2/Test.hs @@ -51,7 +51,7 @@ import Ouroboros.Network.Protocol.TxSubmission2.Server import Ouroboros.Network.Protocol.TxSubmission2.Type import Test.Data.CDDL (Any (..)) -import Test.Ouroboros.Network.Testing.Utils (prop_codec_cborM, +import Test.Ouroboros.Network.Protocol.Utils (prop_codec_cborM, prop_codec_valid_cbor_encoding, splits2, splits3) import Control.DeepSeq diff --git a/ouroboros-network-protocols/testlib/Test/Ouroboros/Network/Testing/Utils.hs b/ouroboros-network-protocols/testlib/Test/Ouroboros/Network/Protocol/Utils.hs similarity index 98% rename from ouroboros-network-protocols/testlib/Test/Ouroboros/Network/Testing/Utils.hs rename to ouroboros-network-protocols/testlib/Test/Ouroboros/Network/Protocol/Utils.hs index 69500874e9..f57438f7f2 100644 --- a/ouroboros-network-protocols/testlib/Test/Ouroboros/Network/Testing/Utils.hs +++ b/ouroboros-network-protocols/testlib/Test/Ouroboros/Network/Protocol/Utils.hs @@ -3,7 +3,7 @@ {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE RankNTypes #-} -- TODO rename to `Test.Ouroboros.Network.Protocols.Utils` -module Test.Ouroboros.Network.Testing.Utils where +module Test.Ouroboros.Network.Protocol.Utils where import Codec.CBOR.FlatTerm qualified as CBOR import Codec.CBOR.Read qualified as CBOR