Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/functional/iam/dry_run.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use crate::common::cli_helpers::ags;
use crate::common::cli_helpers::ags_isolated;
use predicates::prelude::*;

/// --dry-run prints the HTTP method, path, and auth header without making a real request
#[test]
fn test_dry_run_shows_request() {
ags()
ags_isolated()
.args([
"--dry-run",
"--namespace",
Expand All @@ -23,7 +23,7 @@ fn test_dry_run_shows_request() {
/// --dry-run produces no stderr output so stdout can be cleanly piped for inspection
#[test]
fn test_dry_run_no_status_on_stderr() {
ags()
ags_isolated()
.args([
"--dry-run",
"--namespace",
Expand Down
7 changes: 7 additions & 0 deletions tests/scope_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,18 @@ impl CmdOutput {
}

/// Spawn the `ags` binary with the given args and return its output.
///
/// Uses a unique `AGS_HOME` per call so tests don't share profile state
/// with each other or with the host machine's real config.
fn cli(args: &[&str]) -> CmdOutput {
let unique_dir = std::env::temp_dir()
.join(format!("ags-test-{}", std::process::id()))
.join(format!("{:?}", std::thread::current().id()));
let inner = Command::cargo_bin("ags")
.unwrap()
.args(args)
.env("AGS_NO_KEYCHAIN", "1")
.env("AGS_HOME", unique_dir)
.output()
.expect("failed to execute ags binary");
CmdOutput { inner }
Expand Down
1 change: 1 addition & 0 deletions tests/security/config_permissions.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[cfg(unix)]
use ags::runtime::config::ProfileConfig;

// ── Config file permissions (Unix only) ──
Expand Down
Loading