Complete SSH transport release audit (#118)
Some checks failed
Dependency security audit / rustsec (push) Has been cancelled

This commit is contained in:
2026-08-25 22:07:47 +02:00
parent a737e74aae
commit a3da9fda69
18 changed files with 489 additions and 212 deletions

View File

@@ -208,12 +208,17 @@ fn ssh_remotes_are_typed_but_unavailable_before_transport_or_mutation() -> TestR
#[cfg(feature = "ssh")]
#[test]
fn ssh_feature_allows_repository_remote_configuration() -> TestResult {
fn ssh_feature_allows_both_remote_forms_through_add_set_and_get() -> TestResult {
let temporary = tempfile::tempdir()?;
let store = Repository::open(temporary.path())?;
let mut git = GitRepository::init(&store, identity())?;
git.add_remote("origin", "git@example.test:team/store.git")?;
assert_eq!(git.remote_url("origin")?, "git@example.test:team/store.git");
git.set_remote_url("origin", "ssh://git@example.test/team/store.git")?;
assert_eq!(
git.remote_url("origin")?,
"ssh://git@example.test/team/store.git"
);
Ok(())
}