Skip to content

Commit

Permalink
Update gitignore to ignore hello.wasm (#425)
Browse files Browse the repository at this point in the history
* update gitignore; remove package lock

* run test set up inside rust
  • Loading branch information
bowenwang1996 authored Jan 16, 2019
1 parent 4cf2b72 commit 272c725
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 110 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
/test-utils/ganache/storage
/node/service/storage
/keystore/
/tests/hello.wasm
/tests/hello/package-lock.json

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Expand Down
110 changes: 0 additions & 110 deletions tests/hello/package-lock.json

This file was deleted.

7 changes: 7 additions & 0 deletions tests/test_rpc_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ use primitives::test_utils::get_key_pair_from_seed;

const TMP_DIR: &str = "./tmp/test_rpc_cli";
const KEY_STORE_PATH: &str = "./tmp/test_rpc_cli/key_store";
const WASM_PATH: &str = "./tests/hello";
const WAIT_FOR_RETRY: u64 = 500;
const MAX_WAIT_FOR_RETRY: u32 = 5;

Expand All @@ -39,6 +40,12 @@ fn test_service_ready() -> bool {
std::fs::remove_dir_all(base_path.clone()).unwrap();
}

Command::new("sh")
.arg("-c")
.arg(&format!("cd {} && npm install && npm run build", WASM_PATH))
.output()
.expect("build hello.wasm failed");

let network_cfg = devnet::NetworkConfig::default();
let mut client_cfg = devnet::ClientConfig::default();
client_cfg.base_path = base_path;
Expand Down

0 comments on commit 272c725

Please sign in to comment.