Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ThetaSinner committed Apr 6, 2024
1 parent 0c601b3 commit cf995f9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ jobs:
- name: Run Rust tests
run: |
nix develop --command cargo test
nix develop --command npm run test:unit
- name: Run Tryorama tests
run: |
nix develop --command npm test
nix develop --command npm run test:integration
- name: Run CLI tests
run: |
Expand Down
6 changes: 3 additions & 3 deletions dnas/checked/zomes/coordinator/fetch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ mod tests {
println!("Picked signatures: {:?}", picked);

// All from the first 30
assert!(picked.iter().all(|sig| { sig.signature[0] <= 30 }));
assert!(picked.iter().all(|sig| { sig.signature.as_bytes()[0] <= 30 }));
}

#[test]
Expand Down Expand Up @@ -597,7 +597,7 @@ mod tests {
assert_eq!(5, picked.len());

// All from the last 30
assert!(picked.iter().all(|sig| { sig.signature[0] >= 70 }));
assert!(picked.iter().all(|sig| { sig.signature.as_bytes()[0] >= 70 }));
}

#[test]
Expand Down Expand Up @@ -629,7 +629,7 @@ mod tests {
assert_eq!(5, picked.len());

// All from the last 30
assert!(picked.iter().all(|sig| { sig.signature[0] >= 70 }));
assert!(picked.iter().all(|sig| { sig.signature.as_bytes()[0] >= 70 }));
}

fn current_time() -> Timestamp {
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@
"scripts": {
"start": "AGENTS=2 BOOTSTRAP_PORT=$(port) SIGNAL_PORT=$(port) npm run network",
"network": "hc s clean && npm run build:happ && UI_PORT=8888 concurrently \"npm start -w ui\" \"npm run launch:happ\" \"echo 'Not running holochain-playground'\"",
"test": "npm run build:zomes && hc app pack workdir --recursive && RUST_LOG=warn WASM_LOG=info npm t -w tests",
"test:unit": "cargo test",
"test:integration": "npm run build:zomes && hc app pack workdir --recursive && RUST_LOG=warn WASM_LOG=info npm t -w tests",
"test:cli": "npm run build:happ && cargo test --manifest-path ./checked_cli/Cargo.toml",
"test": "npm run test:unit && npm run test:integration && npm run test:cli",
"launch:happ": "hc-spin -n $AGENTS --ui-port $UI_PORT workdir/checked.happ",
"start:tauri": "AGENTS=2 BOOTSTRAP_PORT=$(port) SIGNAL_PORT=$(port) npm run network:tauri",
"network:tauri": "hc s clean && npm run build:happ && UI_PORT=8888 concurrently \"npm start -w ui\" \"npm run launch:tauri\" \"echo 'Not running holochain-playground'\"",
"launch:tauri": "concurrently \"hc run-local-services --bootstrap-port $BOOTSTRAP_PORT --signal-port $SIGNAL_PORT\" \"echo pass | RUST_LOG=warn hc launch --piped -n $AGENTS workdir/checked.happ --ui-port $UI_PORT network --bootstrap http://127.0.0.1:\"$BOOTSTRAP_PORT\" webrtc ws://127.0.0.1:\"$SIGNAL_PORT\"\"",
"package": "npm run build:happ && npm run package -w ui && hc web-app pack workdir --recursive",
"build:happ": "npm run build:zomes && hc app pack workdir --recursive",
"build:zomes": "RUSTFLAGS='' CARGO_TARGET_DIR=target cargo build --release --target wasm32-unknown-unknown",
"test:cli": "npm run build:happ && cargo test --manifest-path ./checked_cli/Cargo.toml",
"lint": "npm run -w ui lint && npm run -w tests lint && cargo clippy && cargo clippy --manifest-path ./checked_cli/Cargo.toml",
"format": "npm run -w ui format && npm run -w tests format && cargo fmt && cargo fmt --manifest-path ./checked_cli/Cargo.toml"
},
Expand Down

0 comments on commit cf995f9

Please sign in to comment.