diff --git a/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/Cargo.toml b/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/Cargo.toml index 08be60d0..a743c053 100644 --- a/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/Cargo.toml +++ b/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/Cargo.toml @@ -1,7 +1,7 @@ [workspace] resolver = "2" members = [ - "echo_test", + "fibonacci_test", ] [profile.release] diff --git a/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/api/fibonacci_test:template.os-v0.wit b/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/api/fibonacci_test:template.os-v0.wit index 5eb0b3a7..bef06257 100644 --- a/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/api/fibonacci_test:template.os-v0.wit +++ b/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/api/fibonacci_test:template.os-v0.wit @@ -1,5 +1,5 @@ -world echo-test-template-dot-os-v0 { - import echo; +world fibonacci-test-template-dot-os-v0 { + import fibonacci; import tester; include process-v0; } diff --git a/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/fibonacci_test/Cargo.toml b/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/fibonacci_test/Cargo.toml index f0207b23..5485e2e1 100644 --- a/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/fibonacci_test/Cargo.toml +++ b/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/fibonacci_test/Cargo.toml @@ -1,18 +1,15 @@ [package] -name = "echo_test" +name = "fibonacci_test" version = "0.1.0" edition = "2021" publish = false [dependencies] anyhow = "1.0" -bincode = "1.3" kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.8.3" } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } -rmp-serde = "1.1" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -thiserror = "1.0" wit-bindgen = "0.24.0" [lib] diff --git a/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/fibonacci_test/src/lib.rs b/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/fibonacci_test/src/lib.rs index c022a247..60fef67c 100644 --- a/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/fibonacci_test/src/lib.rs +++ b/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/fibonacci_test/src/lib.rs @@ -1,4 +1,4 @@ -use crate::kinode::process::echo::{Request as FibRequest, Response as FibResponse}; +use crate::kinode::process::fibonacci::{Request as FibRequest, Response as FibResponse}; use crate::kinode::process::tester::{Request as TesterRequest, Response as TesterResponse, RunRequest, FailResponse}; use kinode_process_lib::{await_message, call_init, print_to_terminal, Address, ProcessId, Request, Response}; @@ -7,7 +7,7 @@ mod tester_lib; wit_bindgen::generate!({ path: "target/wit", - world: "echo-test-template-dot-os-v0", + world: "fibonacci-test-template-dot-os-v0", generate_unused_types: true, additional_derives: [PartialEq, serde::Deserialize, serde::Serialize, process_macros::SerdeJsonInto], }); @@ -17,9 +17,9 @@ fn test_number(n: u32, address: &Address) -> anyhow::Result { .target(address) .body(FibRequest::Number(n)) .send_and_await_response(15)?.unwrap(); - if response.is_request() { fail!("echo_test"); }; + if response.is_request() { fail!("fibonacci_test"); }; let FibResponse::Number(fib_number) = response.body().try_into()? else { - fail!("echo_test"); + fail!("fibonacci_test"); }; Ok(fib_number) } @@ -29,9 +29,9 @@ fn test_numbers(n: u32, n_trials: u32, address: &Address) -> anyhow::Result .target(address) .body(FibRequest::Numbers((n, n_trials))) .send_and_await_response(15)?.unwrap(); - if response.is_request() { fail!("echo_test"); }; + if response.is_request() { fail!("fibonacci_test"); }; let FibResponse::Numbers((fib_number, _)) = response.body().try_into()? else { - fail!("echo_test"); + fail!("fibonacci_test"); }; Ok(fib_number) } @@ -53,12 +53,12 @@ fn handle_message (our: &Address) -> anyhow::Result<()> { input_node_names: node_names, .. }) = message.body().try_into()?; - print_to_terminal(0, "echo_test: a"); + print_to_terminal(0, "fibonacci_test: a"); assert!(node_names.len() == 1); let our_fib_address = Address { node: our.node.clone(), - process: ProcessId::new(Some("echo"), "echo", "template.os"), + process: ProcessId::new(Some("fibonacci"), "fibonacci", "template.os"), }; let numbers = vec![0, 1, 2, 5, 10, 20, 30, 47]; @@ -66,7 +66,7 @@ fn handle_message (our: &Address) -> anyhow::Result<()> { for (number, expected) in numbers.iter().zip(expecteds.iter()) { let result = test_number(number.clone(), &our_fib_address)?; if &result != expected { - fail!("echo_test"); + fail!("fibonacci_test"); } } @@ -75,7 +75,7 @@ fn handle_message (our: &Address) -> anyhow::Result<()> { for (number, expected) in numbers.iter().zip(expecteds.iter()) { let result = test_numbers(number.clone(), 5, &our_fib_address)?; if &result != expected { - fail!("echo_test"); + fail!("fibonacci_test"); } } @@ -95,9 +95,9 @@ fn init(our: Address) { match handle_message(&our) { Ok(()) => {}, Err(e) => { - print_to_terminal(0, format!("echo_test: error: {e:?}").as_str()); + print_to_terminal(0, format!("fibonacci_test: error: {e:?}").as_str()); - fail!("echo_test"); + fail!("fibonacci_test"); }, }; } diff --git a/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/metadata.json b/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/metadata.json index 4ea09898..daeaff69 100644 --- a/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/metadata.json +++ b/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/metadata.json @@ -1,9 +1,9 @@ { - "name": "echo Test", - "description": "A test for echo.", + "name": "fibonacci Test", + "description": "A test for fibonacci.", "image": "", "properties": { - "package_name": "echo_test", + "package_name": "fibonacci_test", "current_version": "0.1.0", "publisher": "template.os", "mirrors": [], @@ -12,7 +12,7 @@ }, "wit_version": 0, "dependencies": [ - "echo:template.os", + "fibonacci:template.os", "tester:sys" ] }, diff --git a/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/pkg/manifest.json b/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/pkg/manifest.json index 5448a0b4..2e0253aa 100644 --- a/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/pkg/manifest.json +++ b/src/new/templates/javascript/no-ui/fibonacci/test/fibonacci_test/pkg/manifest.json @@ -1,14 +1,14 @@ [ { - "process_name": "echo_test", - "process_wasm_path": "/echo_test.wasm", + "process_name": "fibonacci_test", + "process_wasm_path": "/fibonacci_test.wasm", "on_exit": "Restart", "request_networking": false, "request_capabilities": [ - "echo:echo:template.os" + "fibonacci:fibonacci:template.os" ], "grant_capabilities": [ - "echo:echo:template.os" + "fibonacci:fibonacci:template.os" ], "public": true } diff --git a/src/new/templates/javascript/no-ui/fibonacci/test/tests.toml b/src/new/templates/javascript/no-ui/fibonacci/test/tests.toml index b77cede8..b851fba3 100644 --- a/src/new/templates/javascript/no-ui/fibonacci/test/tests.toml +++ b/src/new/templates/javascript/no-ui/fibonacci/test/tests.toml @@ -10,7 +10,7 @@ setup_packages = [ { path = "..", run = true } ] setup_scripts = [] -test_package_paths = ["echo_test"] +test_package_paths = ["fibonacci_test"] test_scripts = [] timeout_secs = 5 fakechain_router = 8545 diff --git a/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/Cargo.toml b/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/Cargo.toml index 08be60d0..a743c053 100644 --- a/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/Cargo.toml +++ b/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/Cargo.toml @@ -1,7 +1,7 @@ [workspace] resolver = "2" members = [ - "echo_test", + "fibonacci_test", ] [profile.release] diff --git a/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/api/fibonacci_test:template.os-v0.wit b/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/api/fibonacci_test:template.os-v0.wit index 5eb0b3a7..bef06257 100644 --- a/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/api/fibonacci_test:template.os-v0.wit +++ b/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/api/fibonacci_test:template.os-v0.wit @@ -1,5 +1,5 @@ -world echo-test-template-dot-os-v0 { - import echo; +world fibonacci-test-template-dot-os-v0 { + import fibonacci; import tester; include process-v0; } diff --git a/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/fibonacci_test/Cargo.toml b/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/fibonacci_test/Cargo.toml index f0207b23..5485e2e1 100644 --- a/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/fibonacci_test/Cargo.toml +++ b/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/fibonacci_test/Cargo.toml @@ -1,18 +1,15 @@ [package] -name = "echo_test" +name = "fibonacci_test" version = "0.1.0" edition = "2021" publish = false [dependencies] anyhow = "1.0" -bincode = "1.3" kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.8.3" } process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } -rmp-serde = "1.1" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -thiserror = "1.0" wit-bindgen = "0.24.0" [lib] diff --git a/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/fibonacci_test/src/lib.rs b/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/fibonacci_test/src/lib.rs index c022a247..60fef67c 100644 --- a/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/fibonacci_test/src/lib.rs +++ b/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/fibonacci_test/src/lib.rs @@ -1,4 +1,4 @@ -use crate::kinode::process::echo::{Request as FibRequest, Response as FibResponse}; +use crate::kinode::process::fibonacci::{Request as FibRequest, Response as FibResponse}; use crate::kinode::process::tester::{Request as TesterRequest, Response as TesterResponse, RunRequest, FailResponse}; use kinode_process_lib::{await_message, call_init, print_to_terminal, Address, ProcessId, Request, Response}; @@ -7,7 +7,7 @@ mod tester_lib; wit_bindgen::generate!({ path: "target/wit", - world: "echo-test-template-dot-os-v0", + world: "fibonacci-test-template-dot-os-v0", generate_unused_types: true, additional_derives: [PartialEq, serde::Deserialize, serde::Serialize, process_macros::SerdeJsonInto], }); @@ -17,9 +17,9 @@ fn test_number(n: u32, address: &Address) -> anyhow::Result { .target(address) .body(FibRequest::Number(n)) .send_and_await_response(15)?.unwrap(); - if response.is_request() { fail!("echo_test"); }; + if response.is_request() { fail!("fibonacci_test"); }; let FibResponse::Number(fib_number) = response.body().try_into()? else { - fail!("echo_test"); + fail!("fibonacci_test"); }; Ok(fib_number) } @@ -29,9 +29,9 @@ fn test_numbers(n: u32, n_trials: u32, address: &Address) -> anyhow::Result .target(address) .body(FibRequest::Numbers((n, n_trials))) .send_and_await_response(15)?.unwrap(); - if response.is_request() { fail!("echo_test"); }; + if response.is_request() { fail!("fibonacci_test"); }; let FibResponse::Numbers((fib_number, _)) = response.body().try_into()? else { - fail!("echo_test"); + fail!("fibonacci_test"); }; Ok(fib_number) } @@ -53,12 +53,12 @@ fn handle_message (our: &Address) -> anyhow::Result<()> { input_node_names: node_names, .. }) = message.body().try_into()?; - print_to_terminal(0, "echo_test: a"); + print_to_terminal(0, "fibonacci_test: a"); assert!(node_names.len() == 1); let our_fib_address = Address { node: our.node.clone(), - process: ProcessId::new(Some("echo"), "echo", "template.os"), + process: ProcessId::new(Some("fibonacci"), "fibonacci", "template.os"), }; let numbers = vec![0, 1, 2, 5, 10, 20, 30, 47]; @@ -66,7 +66,7 @@ fn handle_message (our: &Address) -> anyhow::Result<()> { for (number, expected) in numbers.iter().zip(expecteds.iter()) { let result = test_number(number.clone(), &our_fib_address)?; if &result != expected { - fail!("echo_test"); + fail!("fibonacci_test"); } } @@ -75,7 +75,7 @@ fn handle_message (our: &Address) -> anyhow::Result<()> { for (number, expected) in numbers.iter().zip(expecteds.iter()) { let result = test_numbers(number.clone(), 5, &our_fib_address)?; if &result != expected { - fail!("echo_test"); + fail!("fibonacci_test"); } } @@ -95,9 +95,9 @@ fn init(our: Address) { match handle_message(&our) { Ok(()) => {}, Err(e) => { - print_to_terminal(0, format!("echo_test: error: {e:?}").as_str()); + print_to_terminal(0, format!("fibonacci_test: error: {e:?}").as_str()); - fail!("echo_test"); + fail!("fibonacci_test"); }, }; } diff --git a/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/metadata.json b/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/metadata.json index 4ea09898..daeaff69 100644 --- a/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/metadata.json +++ b/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/metadata.json @@ -1,9 +1,9 @@ { - "name": "echo Test", - "description": "A test for echo.", + "name": "fibonacci Test", + "description": "A test for fibonacci.", "image": "", "properties": { - "package_name": "echo_test", + "package_name": "fibonacci_test", "current_version": "0.1.0", "publisher": "template.os", "mirrors": [], @@ -12,7 +12,7 @@ }, "wit_version": 0, "dependencies": [ - "echo:template.os", + "fibonacci:template.os", "tester:sys" ] }, diff --git a/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/pkg/manifest.json b/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/pkg/manifest.json index 5448a0b4..2e0253aa 100644 --- a/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/pkg/manifest.json +++ b/src/new/templates/python/no-ui/fibonacci/test/fibonacci_test/pkg/manifest.json @@ -1,14 +1,14 @@ [ { - "process_name": "echo_test", - "process_wasm_path": "/echo_test.wasm", + "process_name": "fibonacci_test", + "process_wasm_path": "/fibonacci_test.wasm", "on_exit": "Restart", "request_networking": false, "request_capabilities": [ - "echo:echo:template.os" + "fibonacci:fibonacci:template.os" ], "grant_capabilities": [ - "echo:echo:template.os" + "fibonacci:fibonacci:template.os" ], "public": true } diff --git a/src/new/templates/python/no-ui/fibonacci/test/tests.toml b/src/new/templates/python/no-ui/fibonacci/test/tests.toml index b77cede8..b851fba3 100644 --- a/src/new/templates/python/no-ui/fibonacci/test/tests.toml +++ b/src/new/templates/python/no-ui/fibonacci/test/tests.toml @@ -10,7 +10,7 @@ setup_packages = [ { path = "..", run = true } ] setup_scripts = [] -test_package_paths = ["echo_test"] +test_package_paths = ["fibonacci_test"] test_scripts = [] timeout_secs = 5 fakechain_router = 8545