upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/lib/login/existing.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-11-26 16:28:09 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2024-11-26 16:28:09 +0000
commitbdf71cb3d5a5ff8399c10c8d2492d3dd01c5fa33 (patch)
tree057008f20a0206f76b4a64f39fb12417c2e018a0 /src/lib/login/existing.rs
parent08397221abcd009fee1ab1b69d92b107b604bee1 (diff)
test(login): update `ngit login` test
to reflect the new interface and testing only nsec login
Diffstat (limited to 'src/lib/login/existing.rs')
-rw-r--r--src/lib/login/existing.rs17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/lib/login/existing.rs b/src/lib/login/existing.rs
index 342f792..872e459 100644
--- a/src/lib/login/existing.rs
+++ b/src/lib/login/existing.rs
@@ -69,11 +69,18 @@ fn get_signer_info(
69 Ok(match source { 69 Ok(match source {
70 None => { 70 None => {
71 let mut result = None; 71 let mut result = None;
72 for source in &[ 72 for source in if std::env::var("NGITTEST").is_ok() {
73 SignerInfoSource::CommandLineArguments, 73 vec![
74 SignerInfoSource::GitLocal, 74 SignerInfoSource::CommandLineArguments,
75 SignerInfoSource::GitGlobal, 75 SignerInfoSource::GitLocal,
76 ] { 76 ]
77 } else {
78 vec![
79 SignerInfoSource::CommandLineArguments,
80 SignerInfoSource::GitLocal,
81 SignerInfoSource::GitGlobal,
82 ]
83 } {
77 if let Ok(res) = 84 if let Ok(res) =
78 get_signer_info(git_repo, signer_info, password, &Some(source.clone())) 85 get_signer_info(git_repo, signer_info, password, &Some(source.clone()))
79 { 86 {