MCPcopy Create free account
hub / github.com/bytecodealliance/cargo-component / it_warns_with_proxy_and_adapter_settings

Function it_warns_with_proxy_and_adapter_settings

tests/build.rs:861–883  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

859
860#[test]
861fn it_warns_with_proxy_and_adapter_settings() -> Result<()> {
862 let project = Project::new("foo", true)?;
863 let adapter_path = "adapter/wasi_snapshot_preview1.wasm";
864 project.file(
865 adapter_path,
866 wasi_preview1_component_adapter_provider::WASI_SNAPSHOT_PREVIEW1_REACTOR_ADAPTER,
867 )?;
868 project.update_manifest(|mut doc| {
869 doc["package"]["metadata"]["component"]["proxy"] = value(true);
870 doc["package"]["metadata"]["component"]["adapter"] = value(adapter_path);
871 Ok(doc)
872 })?;
873
874 project
875 .cargo_component(["build"])
876 .assert()
877 .stderr(contains("warning: ignoring `proxy` setting due to `adapter` setting being present in `Cargo.toml`"))
878 .success();
879
880 validate_component(&project.debug_wasm("foo"))?;
881
882 Ok(())
883}
884
885#[test]
886fn it_builds_with_proxy_adapter() -> Result<()> {

Callers

nothing calls this directly

Calls 5

validate_componentFunction · 0.85
cargo_componentMethod · 0.80
debug_wasmMethod · 0.80
fileMethod · 0.45
update_manifestMethod · 0.45

Tested by

no test coverage detected