Skip to content

Commit

Permalink
Merge pull request #2062 from fermyon/testing-poc
Browse files Browse the repository at this point in the history
Runtime Testing POC
  • Loading branch information
rylev authored Nov 28, 2023
2 parents f4d4ea5 + 07b5779 commit 0e93cea
Show file tree
Hide file tree
Showing 26 changed files with 1,552 additions and 18 deletions.
78 changes: 65 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spin-key-value-sqlite = { path = "crates/key-value-sqlite" }
path-absolutize = "3.0.11"
rand = "0.8"
regex = "1.5.5"
reqwest = { version = "0.11", features = ["stream"] }
reqwest = { workspace = true }
rpassword = "7.0"
semver = "1.0"
serde = { version = "1.0", features = ["derive"] }
Expand Down Expand Up @@ -87,6 +87,7 @@ sha2 = "0.10.1"
which = "4.2.5"
e2e-testing = { path = "crates/e2e-testing" }
http-body-util = { workspace = true }
runtime-tests = { path = "tests/runtime-tests" }

[build-dependencies]
cargo-target-dep = { git = "https://github.com/fermyon/cargo-target-dep", rev = "b7b1989fe0984c0f7c4966398304c6538e52fe49" }
Expand All @@ -108,19 +109,24 @@ llm-metal = ["llm", "spin-trigger-http/llm-metal"]
llm-cublas = ["llm", "spin-trigger-http/llm-cublas"]

[workspace]
members = ["crates/*", "sdk/rust", "sdk/rust/macro"]
members = ["crates/*", "sdk/rust", "sdk/rust/macro", "tests/runtime-tests"]

[workspace.dependencies]
anyhow = "1.0.75"
http-body-util = "=0.1.0-rc.2"
hyper = { version = "=1.0.0-rc.3", features = ["full"] }
reqwest = { version = "0.11", features = ["stream"] }
tracing = { version = "0.1", features = ["log"] }

# Use forked wasmtime 14.0.4 with backported patches to fix a performance regression
# TODO: Replace with wasmtime 15 release.
wasi-common-preview1 = { git = "https://github.com/fermyon/wasmtime", rev = "a2fa8fe7de1e918eae06d78de53451832ba380b6", package = "wasi-common" }
wasmtime = { git = "https://github.com/fermyon/wasmtime", rev = "a2fa8fe7de1e918eae06d78de53451832ba380b6" , features = ["component-model"] }
wasmtime-wasi = { git = "https://github.com/fermyon/wasmtime", rev = "a2fa8fe7de1e918eae06d78de53451832ba380b6", features = ["tokio"] }
wasmtime = { git = "https://github.com/fermyon/wasmtime", rev = "a2fa8fe7de1e918eae06d78de53451832ba380b6", features = [
"component-model",
] }
wasmtime-wasi = { git = "https://github.com/fermyon/wasmtime", rev = "a2fa8fe7de1e918eae06d78de53451832ba380b6", features = [
"tokio",
] }
wasmtime-wasi-http = { git = "https://github.com/fermyon/wasmtime", rev = "a2fa8fe7de1e918eae06d78de53451832ba380b6" }

spin-componentize = { git = "https://github.com/fermyon/spin-componentize", rev = "191789170abde10cd55590466c0660dd6c7d472a" }
Expand Down
2 changes: 1 addition & 1 deletion crates/doctor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ ui-testing = { path = "../ui-testing" }
[[test]]
name = "ui"
path = "tests/ui.rs"
harness = false
harness = false
2 changes: 2 additions & 0 deletions e2e-tests.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ RUN printf '#!/bin/bash
cargo build --release \n \
fi \n\n \
cargo test spinup_tests --features e2e-tests --no-fail-fast -- --nocapture \n \
# Run the runtime tests which will supersede many e2e tests in the future \n \
cargo test -F e2e-tests -- runtime_tests --nocapture \n \
' > /usr/local/bin/entrypoint.sh

RUN chmod +x /usr/local/bin/entrypoint.sh
Expand Down
Loading

0 comments on commit 0e93cea

Please sign in to comment.