use std::env;
use std::fs;
use std::path::Path;
use log::warn;
#[test]
#[ignore = "requires a running Neo Express instance"]
fn hello_world_nef_is_deployable() {
let nef = Path::new("build/solana_hello.nef");
let manifest = Path::new("build/solana_hello.manifest.json");
if !nef.exists() || !manifest.exists() {
warn!(
"Skipping: expected {} and {} to exist; run `make cross-chain` first",
nef.display(),
manifest.display()
);
return;
}
let rpc = match env::var("NEO_EXPRESS_RPC") {
Ok(value) => value,
Err(_) => {
warn!("Skipping Neo Express integration test – set NEO_EXPRESS_RPC to enable.");
return;
}
};
let nef_bytes = fs::read(nef).expect("failed to read NEF");
let manifest_bytes = fs::read(manifest).expect("failed to read manifest");
warn!(
"Ready to deploy solana-hello (NEF {} bytes, manifest {} bytes) via {rpc}",
nef_bytes.len(),
manifest_bytes.len()
);
}
#[test]
#[ignore = "requires a running Neo Express instance"]
fn move_coin_nef_is_available() {
let nef = Path::new("build/MoveCoin.nef");
let manifest = Path::new("build/MoveCoin.manifest.json");
if !nef.exists() || !manifest.exists() {
warn!(
"Skipping: expected {} and {} to exist; run `make cross-chain` first",
nef.display(),
manifest.display()
);
}
}