Skip to content

Commit

Permalink
tests: add integration test framework
Browse files Browse the repository at this point in the history
To support integration tests written in rust, let's add a new package
(which will only be used internally) called integration-tests.

Inside the package, we have a tests repo where we can put tests.

The package imports other trustee packages using a local path,
so it should always have the most recent version of things.

Now integration tests will run simply by doing cargo test at the top of
the repo.

Signed-off-by: Tobin Feldman-Fitzthum <[email protected]>
  • Loading branch information
fitzthum committed Dec 20, 2024
1 parent 64e3cb1 commit 708477f
Show file tree
Hide file tree
Showing 6 changed files with 283 additions and 59 deletions.
89 changes: 33 additions & 56 deletions Cargo.lock

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

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ members = [
"rvps",
"tools/kbs-client",
"deps/verifier",
"integration-tests",
]
resolver = "2"

Expand Down Expand Up @@ -37,6 +38,7 @@ kbs-types = "0.7.0"
kms = { git = "https://github.com/confidential-containers/guest-components.git", rev = "e6999a3c0fd877dae9e68ea78b8b483062db32b8", default-features = false }
jsonwebtoken = { version = "9", default-features = false }
log = "0.4.17"
openssl = "0.10.55"
prost = "0.13"
regorus = { version = "0.2.6", default-features = false, features = [
"regex",
Expand All @@ -51,7 +53,7 @@ rstest = "0.18.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0.132"
serde_with = { version = "1.11.0", features = ["base64", "hex"] }
serial_test = "0.9.0"
serial_test = { version = "3.2.0", features = ["async"] }
sha2 = "0.10"
shadow-rs = "0.19.0"
strum = { version = "0.25", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion attestation-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jsonwebtoken.workspace = true
kbs-types.workspace = true
lazy_static = "1.4.0"
log.workspace = true
openssl = "0.10.55"
openssl.workspace = true
prost = { workspace = true, optional = true }
rand = "0.8.5"
reference-value-provider-service.path = "../rvps"
Expand Down
24 changes: 24 additions & 0 deletions integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[package]
name = "integration-tests"
version.workspace = true
authors.workspace = true
description.workspace = true
documentation.workspace = true
edition.workspace = true

[dependencies]
kbs = { path = "../kbs" }
attestation-service = { path = "../attestation-service" }
kbs-client = { path = "../tools/kbs-client" }

actix-web.workspace = true
actix-rt = "2.10.0"
anyhow.workspace = true
env_logger.workspace = true
log.workspace = true
openssl.workspace = true
rstest.workspace = true
serde_json.workspace = true
serial_test.workspace = true
tempfile.workspace = true
tokio.workspace = true
Loading

0 comments on commit 708477f

Please sign in to comment.