Skip to content

Commit

Permalink
chore: remove marine-rs-sdk-test usages
Browse files Browse the repository at this point in the history
  • Loading branch information
ValeryAntopol committed Aug 15, 2023
1 parent bcb10af commit 5142dde
Show file tree
Hide file tree
Showing 48 changed files with 242 additions and 1,580 deletions.
1,464 changes: 240 additions & 1,224 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ members = [
"examples/url-downloader/curl_adapter",
"examples/url-downloader/facade",
"examples/url-downloader/local_storage",
"examples/multiservice_marine_test",
"examples/multiservice_marine_test/consumer",
"examples/multiservice_marine_test/producer",
"examples/build_rs",
"marine",
"marine/tests/wasm_tests/arguments_passing",
"marine/tests/wasm_tests/arrays_passing",
Expand Down
1 change: 0 additions & 1 deletion core/tests/wasm_tests/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# This script builds all tests
(
cd lilo_after_2gb || exit;
cargo update --aggressive;
marine build --release;
rm artifacts/* || true;
mkdir artifacts
Expand Down
21 changes: 0 additions & 21 deletions examples/build_rs/Cargo.toml

This file was deleted.

6 changes: 0 additions & 6 deletions examples/build_rs/Config.toml

This file was deleted.

18 changes: 0 additions & 18 deletions examples/build_rs/build.rs

This file was deleted.

10 changes: 0 additions & 10 deletions examples/build_rs/build.sh

This file was deleted.

38 changes: 0 additions & 38 deletions examples/build_rs/src/main.rs

This file was deleted.

3 changes: 0 additions & 3 deletions examples/call_parameters/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,3 @@ path = "src/main.rs"

[dependencies]
marine-rs-sdk ="0.7.0"

[dev-dependencies]
marine-rs-sdk-test = "0.8.1"
Binary file modified examples/call_parameters/artifacts/call_parameters.wasm
Binary file not shown.
1 change: 0 additions & 1 deletion examples/call_parameters/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/sh

cargo update --aggressive;
marine build --release;

rm -f artifacts/* || true;
Expand Down
39 changes: 0 additions & 39 deletions examples/call_parameters/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,42 +38,3 @@ pub fn call_parameters() -> String {
cp.tetraplets
)
}

#[cfg(test)]
mod tests {
use marine_rs_sdk_test::marine_test;
use marine_rs_sdk_test::CallParameters;

#[marine_test(config_path = "../Config.toml", modules_dir = "../artifacts")]
fn empty_string(call_parameters: marine_test_env::call_parameters::ModuleInterface) {
let init_peer_id = "init_peer_id";
let service_id = "service_id";
let service_creator_peer_id = "service_creator_peer_id";
let host_id = "host_id";
let particle_id = "particle_id";

let tetraplet = marine_rs_sdk::SecurityTetraplet {
function_name: "some_func_name".to_string(),
json_path: "some_json_path".to_string(),
..Default::default()
};

let tetraplets = vec![vec![tetraplet]];

let cp = CallParameters {
init_peer_id: init_peer_id.to_string(),
service_id: service_id.to_string(),
service_creator_peer_id: service_creator_peer_id.to_string(),
host_id: host_id.to_string(),
particle_id: particle_id.to_string(),
tetraplets: tetraplets.clone(),
};

let actual = call_parameters.call_parameters_cp(cp);
let expected = format!(
"{}\n{}\n{}\n{}\n{}\n{:?}",
init_peer_id, service_id, service_creator_peer_id, host_id, particle_id, tetraplets
);
assert_eq!(actual, expected);
}
}
3 changes: 0 additions & 3 deletions examples/failing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@ path = "src/main.rs"

[dependencies]
marine-rs-sdk = "0.8.1"

[dev-dependencies]
marine-rs-sdk-test = "0.8.1"
Binary file modified examples/failing/artifacts/failing.wasm
Binary file not shown.
1 change: 0 additions & 1 deletion examples/failing/build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/sh

# This script builds all subprojects and puts all created Wasm modules in one dir
cargo update --aggressive
marine build --release

rm artifacts/* || true
Expand Down
3 changes: 0 additions & 3 deletions examples/greeting/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@ path = "src/main.rs"

[dependencies]
marine-rs-sdk = "0.8.1"

[dev-dependencies]
marine-rs-sdk-test = "0.8.1"
Binary file modified examples/greeting/artifacts/greeting.wasm
Binary file not shown.
1 change: 0 additions & 1 deletion examples/greeting/build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/sh

# This script builds all subprojects and puts all created Wasm modules in one dir
cargo update --aggressive
marine build --release

rm artifacts/* || true
Expand Down
17 changes: 0 additions & 17 deletions examples/greeting/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,3 @@ pub fn main() {}
pub fn greeting(name: String) -> String {
format!("Hi, {}", name)
}

#[cfg(test)]
mod tests {
use marine_rs_sdk_test::marine_test;

#[marine_test(config_path = "../Config.toml", modules_dir = "../artifacts")]
fn empty_string(greeting: marine_test_env::greeting::ModuleInterface) {
let actual = greeting.greeting(String::new());
assert_eq!(actual, "Hi, ");
}

#[marine_test(config_path = "../Config.toml", modules_dir = "../artifacts")]
fn non_empty_string(greeting: marine_test_env::greeting::ModuleInterface) {
let actual = greeting.greeting("name".to_string());
assert_eq!(actual, "Hi, name");
}
}
2 changes: 0 additions & 2 deletions examples/greeting_record/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,3 @@ path = "src/main.rs"
marine-rs-sdk = {version = "0.7.0", features = ["logger"]}
log = "0.4.8"

[dev-dependencies]
marine-rs-sdk-test = "0.8.1"
Binary file modified examples/greeting_record/artifacts/greeting-record.wasm
Binary file not shown.
1 change: 0 additions & 1 deletion examples/greeting_record/build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/sh

# This script builds all subprojects and puts all created Wasm modules in one dir
cargo update --aggressive
marine build --release

rm artifacts/* || true
Expand Down
12 changes: 0 additions & 12 deletions examples/greeting_record/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,3 @@ pub fn log_trace() {

#[marine]
pub fn void_fn() {}

#[cfg(test)]
mod tests {
use marine_rs_sdk_test::marine_test;

#[marine_test(config_path = "../Config.toml", modules_dir = "../artifacts")]
fn smoke_test(greeting: marine_test_env::greeting_record::ModuleInterface) {
let actual = greeting.greeting_record();
assert_eq!(actual.str, "Hello, world!");
assert_eq!(actual.num, 42);
}
}
Binary file modified examples/ipfs-node/artifacts/ipfs_effector.wasm
Binary file not shown.
Binary file modified examples/ipfs-node/artifacts/ipfs_pure.wasm
Binary file not shown.
2 changes: 0 additions & 2 deletions examples/ipfs-node/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
# This script builds all subprojects and puts all created Wasm modules in one dir
(
cd effector || exit;
cargo update --aggressive;
marine build --release;
)

(
cd pure || exit;
cargo update --aggressive;
marine build --release;
)

Expand Down
2 changes: 0 additions & 2 deletions examples/motivational-example/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
# This script builds all subprojects and puts all created Wasm modules in one dir
(
cd shrek || exit;
cargo update --aggressive;
marine build --release;
)

(
cd donkey || exit;
cargo update --aggressive;
marine build --release;
)

Expand Down
11 changes: 0 additions & 11 deletions examples/multiservice_marine_test/Cargo.toml

This file was deleted.

13 changes: 0 additions & 13 deletions examples/multiservice_marine_test/consumer/Cargo.toml

This file was deleted.

6 changes: 0 additions & 6 deletions examples/multiservice_marine_test/consumer/Config.toml

This file was deleted.

10 changes: 0 additions & 10 deletions examples/multiservice_marine_test/consumer/build.sh

This file was deleted.

16 changes: 0 additions & 16 deletions examples/multiservice_marine_test/consumer/src/main.rs

This file was deleted.

13 changes: 0 additions & 13 deletions examples/multiservice_marine_test/producer/Cargo.toml

This file was deleted.

6 changes: 0 additions & 6 deletions examples/multiservice_marine_test/producer/Config.toml

This file was deleted.

10 changes: 0 additions & 10 deletions examples/multiservice_marine_test/producer/build.sh

This file was deleted.

Loading

0 comments on commit 5142dde

Please sign in to comment.