From 7d3158ebd3258a636175fdeaffcd0b32fb44be8b Mon Sep 17 00:00:00 2001 From: stormshield-gt Date: Thu, 12 Dec 2024 12:45:48 +0100 Subject: [PATCH] isolated slow tests --- .github/workflows/ci.yml | 2 +- README.md | 8 +++++++- vaultrs-tests/tests/api_tests/aws.rs | 2 ++ vaultrs-tests/tests/api_tests/login.rs | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1a3b1f..48f05d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,7 @@ jobs: - name: Install stable uses: dtolnay/rust-toolchain@stable - name: cargo test - run: cargo test --all-targets --all-features --workspace + run: cargo test --all-targets --all-features --workspace -- --include-ignored # https://github.com/rust-lang/cargo/issues/6669 - name: cargo test --doc run: cargo test --all-features --workspace --doc diff --git a/README.md b/README.md index ac16280..5efc515 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,12 @@ See the the [tests][3] directory for tests. Run tests with `cargo test`. Docker. In order to run tests Docker must be running locally (Docker Desktop works). The first run will be longer than other because it will fetch images. +Some long-running tests are ignored by default locally. To run them do: + +```sh +cargo test -- --include-ignored +``` + ## Contributing Check out the [issues][2] for items needing attention or submit your own and @@ -128,6 +134,6 @@ architecture of this library and how to add additional functionality to it. [1]: https://developer.hashicorp.com/vault/ [2]: https://github.com/jmgilman/vaultrs/issues -[3]: https://github.com/jmgilman/vaultrs/tree/master/tests +[3]: https://github.com/jmgilman/vaultrs/tree/master/vaultrs-tests/tests/api_tests [5]: https://github.com/jmgilman/vaultrs/tree/master/CONTRIBUTING.md [6]: https://docs.rs/vaultrs diff --git a/vaultrs-tests/tests/api_tests/aws.rs b/vaultrs-tests/tests/api_tests/aws.rs index 0420a28..007988e 100644 --- a/vaultrs-tests/tests/api_tests/aws.rs +++ b/vaultrs-tests/tests/api_tests/aws.rs @@ -5,6 +5,7 @@ use vaultrs::error::ClientError; use vaultrs::sys::{auth, mount}; #[tokio::test] +#[ignore] async fn test_auth() { let test = Test::builder().with_localstack(["iam", "sts"]).await; let client = test.client(); @@ -55,6 +56,7 @@ async fn test_auth() { } #[tokio::test] +#[ignore] async fn test_secret_engine() { let test = Test::builder().with_localstack(["iam", "sts"]).await; diff --git a/vaultrs-tests/tests/api_tests/login.rs b/vaultrs-tests/tests/api_tests/login.rs index 81cedbf..ee55ed9 100644 --- a/vaultrs-tests/tests/api_tests/login.rs +++ b/vaultrs-tests/tests/api_tests/login.rs @@ -12,6 +12,7 @@ use vaultrs_login::LoginClient; use crate::common::Test; #[tokio::test] +#[ignore] async fn test() { let mut test = Test::builder() .with_localstack(["iam", "sts"])