From e19d7f1ccca55bf3a3632de07684de2669fe2551 Mon Sep 17 00:00:00 2001 From: Willem Wyndham Date: Tue, 3 Oct 2023 16:59:12 -0400 Subject: [PATCH] fix: use feature instead of cfg so that cargo test --list can find tests --- cmd/crates/soroban-test/Cargo.toml | 3 +++ cmd/crates/soroban-test/tests/it/main.rs | 2 +- cmd/soroban-rpc/internal/test/cli_test.go | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/crates/soroban-test/Cargo.toml b/cmd/crates/soroban-test/Cargo.toml index 6d157780b7..e2a4d4d877 100644 --- a/cmd/crates/soroban-test/Cargo.toml +++ b/cmd/crates/soroban-test/Cargo.toml @@ -37,3 +37,6 @@ fs_extra = "1.3.0" serde_json = "1.0.93" which = { workspace = true } tokio = "1.28.1" + +[features] +integration = [] \ No newline at end of file diff --git a/cmd/crates/soroban-test/tests/it/main.rs b/cmd/crates/soroban-test/tests/it/main.rs index 424ea37122..2e9d8bc5cd 100644 --- a/cmd/crates/soroban-test/tests/it/main.rs +++ b/cmd/crates/soroban-test/tests/it/main.rs @@ -1,6 +1,6 @@ mod arg_parsing; mod config; -#[cfg(ignore)] +#[cfg(feature = "integration")] mod integration; mod lab; mod plugin; diff --git a/cmd/soroban-rpc/internal/test/cli_test.go b/cmd/soroban-rpc/internal/test/cli_test.go index 186428ecbc..46d5c12b4c 100644 --- a/cmd/soroban-rpc/internal/test/cli_test.go +++ b/cmd/soroban-rpc/internal/test/cli_test.go @@ -34,7 +34,7 @@ func cargoTest(t *testing.T, name string) { } func TestCLICargoTest(t *testing.T) { - names := icmd.RunCmd(icmd.Command("cargo", "-q", "test", "integration::", "--package", "soroban-test", "--", "--list")) + names := icmd.RunCmd(icmd.Command("cargo", "-q", "test", "integration::", "--package", "soroban-test", "--features", "integration", "--", "--list")) input := names.Stdout() lines := strings.Split(input, "\n") for _, line := range lines {