Add typed SSH remote endpoints
This commit is contained in:
@@ -1939,15 +1939,16 @@ mod tests {
|
||||
assert!(stderr.is_empty());
|
||||
|
||||
let remote = &config.git_remotes()[0];
|
||||
let (server_id, application_id) = remote.https_credentials().expect("HTTPS remote");
|
||||
secrets.create(
|
||||
&SecretReference::https_git_credential(
|
||||
remote.server_id().as_str(),
|
||||
remote.application_id().as_str(),
|
||||
server_id.as_str(),
|
||||
application_id.as_str(),
|
||||
"fixture-account",
|
||||
)?,
|
||||
SecretBytes::new(b"fixture-token".to_vec()),
|
||||
)?;
|
||||
let credential = secrets.credential(remote.server_id(), remote.application_id())?;
|
||||
let credential = secrets.credential(server_id, application_id)?;
|
||||
assert_eq!(credential.username(), "fixture-account");
|
||||
assert_eq!(credential.password(), b"fixture-token");
|
||||
Ok(())
|
||||
|
||||
@@ -7601,7 +7601,7 @@ mod tests {
|
||||
assert_eq!(error.git_error(), Some(&GitError::ForbiddenRemoteUrl));
|
||||
assert_eq!(
|
||||
error.to_string(),
|
||||
"Git remotes must use credential-free HTTPS URLs"
|
||||
"the Git remote URL is invalid or forbidden"
|
||||
);
|
||||
|
||||
assert!(DesktopGitRequest::Pull.requires_authentication());
|
||||
|
||||
Reference in New Issue
Block a user