[docs](trx-rs): record the trx-config crate and its commands
CI / lint (pull_request) Failing after 1s
CI / test (pull_request) Failing after 6m6s
CI / reuse (pull_request) Has been cancelled
CI / frontend (pull_request) Has been cancelled

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyX26FCpMQxiBoC7r5K1A7
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
sjg
2026-08-06 21:39:09 +02:00
co-authored by Claude Opus 5
parent bc63ded583
commit 084f629b5b
3 changed files with 21 additions and 13 deletions
+13 -11
View File
@@ -1523,17 +1523,19 @@ url = "remote.example.com:4530"
#[test]
fn test_remote_token_file_fills_token() {
let f = secret_file("remote-token");
let mut config = ClientConfig::default();
config.remotes = vec![RemoteEntry {
name: "hf".to_string(),
url: "127.0.0.1:4530".to_string(),
rig_id: None,
auth: RemoteAuthConfig {
token: None,
token_file: Some(f.path().to_str().unwrap().to_string()),
},
poll_interval_ms: 750,
}];
let mut config = ClientConfig {
remotes: vec![RemoteEntry {
name: "hf".to_string(),
url: "127.0.0.1:4530".to_string(),
rig_id: None,
auth: RemoteAuthConfig {
token: None,
token_file: Some(f.path().to_str().unwrap().to_string()),
},
poll_interval_ms: 750,
}],
..Default::default()
};
config.resolve_secrets(None).unwrap();
assert_eq!(config.remotes[0].auth.token.as_deref(), Some("remote-token"));
}
-1
View File
@@ -196,7 +196,6 @@ fn annotate(doc: &mut DocumentMut, path: &str, comment: &str) {
#[cfg(test)]
mod tests {
use super::*;
use crate::ConfigFile;
/// The checked-in example must match what the structs produce, so a new
/// config field cannot land without showing up in the example.