fix(e2e): use non-default credentials in cluster test constructor (#5039)

Commit aec2ee9ec (#5005) enforced that RPC secrets cannot be derived
from the public default credentials. This broke all multi-node cluster
E2E tests that relied on the constructor's DEFAULT_ACCESS_KEY /
DEFAULT_SECRET_KEY defaults.

Move the non-default credential and RUSTFS_RPC_SECRET blanking into
the RustFSTestClusterEnvironment constructor so every cluster test
starts with a valid RPC secret derivation base. Remove the per-test
overrides in cluster_multidrive_pool_test that were added as a partial
fix in #5005.
This commit is contained in:
Zhengchao An
2026-07-20 10:37:37 +08:00
committed by GitHub
parent 998c3f561c
commit db3b08b612
2 changed files with 3 additions and 8 deletions
@@ -87,12 +87,6 @@ async fn cluster_two_pool_smoke() -> TestResult {
let mut cluster =
RustFSTestClusterEnvironment::with_topology(ClusterTopology::per_node_pools(2, vec![vec![0], vec![1]])).await?;
cluster.access_key = "custom-two-pool-access".to_string();
cluster.secret_key = "custom-two-pool-secret".to_string();
// Override any inherited test-runner value with an explicit blank. The
// credentials getter treats blank as absent and must derive one stable RPC
// secret from the shared non-default credential pair on every node.
cluster.set_env("RUSTFS_RPC_SECRET", "");
// The two-pool layout must emit one ellipses argument per pool.
let volumes = cluster.rustfs_volumes_arg();