forked from maidsafe/autonomi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request maidsafe#2181 from RolandSherwin/emv_ci_2
feat: enable CI action
- Loading branch information
Showing
15 changed files
with
424 additions
and
355 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -1,24 +1,37 @@ | ||
// Copyright 2024 MaidSafe.net limited. | ||
// | ||
// This SAFE Network Software is licensed to you under The General Public License (GPL), version 3. | ||
// Unless required by applicable law or agreed to in writing, the SAFE Network Software distributed | ||
// under the GPL Licence is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. Please review the Licences for the specific language governing | ||
// permissions and limitations relating to use of the SAFE Network Software. | ||
|
||
#![cfg(feature = "data")] | ||
|
||
mod common; | ||
|
||
use autonomi::Client; | ||
use common::peers_from_env; | ||
use eyre::Result; | ||
use sn_logging::LogBuilder; | ||
use std::time::Duration; | ||
use test_utils::evm::get_funded_wallet; | ||
use tokio::time::sleep; | ||
|
||
#[tokio::test] | ||
async fn put() { | ||
common::enable_logging(); | ||
async fn put() -> Result<()> { | ||
let _log_appender_guard = LogBuilder::init_single_threaded_tokio_test("put", false); | ||
|
||
let client = Client::connect(&[]).await.unwrap(); | ||
let client = Client::connect(&peers_from_env()?).await?; | ||
let wallet = get_funded_wallet(); | ||
let data = common::gen_random_data(1024 * 1024 * 10); | ||
|
||
let addr = client.put(data.clone(), &wallet).await.unwrap(); | ||
let addr = client.put(data.clone(), &wallet).await?; | ||
|
||
sleep(Duration::from_secs(10)).await; | ||
|
||
let data_fetched = client.get(addr).await.unwrap(); | ||
let data_fetched = client.get(addr).await?; | ||
assert_eq!(data, data_fetched, "data fetched should match data put"); | ||
|
||
Ok(()) | ||
} |
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
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 was deleted.
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
Oops, something went wrong.