This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[zombinet] initial implementation of zombienet backchannel (#4377)
- Loading branch information
Showing
5 changed files
with
430 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[package] | ||
name = "zombienet-backchannel" | ||
description = "Zombienet backchannel to notify test runner and coordinate with malus actors." | ||
license = "GPL-3.0-only" | ||
version = "0.9.13" | ||
authors = ["Parity Technologies <admin@parity.io>"] | ||
edition = "2021" | ||
readme = "README.md" | ||
publish = false | ||
|
||
[dependencies] | ||
tokio = { version = "1.0.0", default-features = false, features = ["macros", "net", "rt-multi-thread", "sync"] } | ||
url = "2.0.0" | ||
tokio-tungstenite = "0.16" | ||
futures-util = "0.3.18" | ||
lazy_static = "1.4.0" | ||
parity-scale-codec = { version = "2.3.1", features = ["derive"] } | ||
reqwest = "0.11" | ||
thiserror = "1.0.30" | ||
tracing = "0.1.26" | ||
serde = { version = "1.0", features = ["derive"] } | ||
serde_json = "1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright 2021 Parity Technologies (UK) Ltd. | ||
// This file is part of Polkadot. | ||
|
||
// Polkadot is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
|
||
// Polkadot is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
// You should have received a copy of the GNU General Public License | ||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
//! Polkadot Zombienet Backchannel error definitions. | ||
|
||
#[derive(Debug, thiserror::Error)] | ||
#[allow(missing_docs)] | ||
pub enum BackchannelError { | ||
#[error("Error connecting websocket server")] | ||
CantConnectToWS, | ||
|
||
#[error("Backchannel not initialized yet")] | ||
Uninitialized, | ||
|
||
#[error("Backchannel already initialized")] | ||
AlreadyInitialized, | ||
|
||
#[error("Error sending new value to backchannel")] | ||
SendItemFail, | ||
|
||
#[error("Invalid host for connection backchannel")] | ||
InvalidHost, | ||
|
||
#[error("Invalid port for connection backchannel")] | ||
InvalidPort, | ||
} |
Oops, something went wrong.