Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: merge print.bash into usage.bash #3991

Merged
merged 4 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions e2e/tests-dfx/build_rust.bash

This file was deleted.

24 changes: 24 additions & 0 deletions e2e/tests-dfx/rust.bash
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,27 @@ teardown() {
assert_command dfx canister call can3 id
assert_contains '(3 : nat32)'
}

@test "build without cargo-audit installed cannot check for vulnerabilities" {
dfx_new
assert_command rustup default stable
assert_command rustup target add wasm32-unknown-unknown
install_asset vulnerable_rust_deps
dfx_start
dfx canister create --all
assert_command dfx build
assert_match "Cannot check for vulnerabilities in rust canisters because cargo-audit is not installed."
}

@test "build with vulnerabilities in rust dependencies emits a warning" {
dfx_new
assert_command rustup default stable
assert_command rustup target add wasm32-unknown-unknown
assert_command cargo install cargo-audit --locked
assert_command cargo audit --version
install_asset vulnerable_rust_deps
dfx_start
dfx canister create --all
assert_command dfx build
assert_match "Audit found vulnerabilities"
}
Loading