Skip to content

Commit

Permalink
failing test for us setting up remote information after cloning (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Nov 1, 2022
1 parent c788b51 commit 07efbce
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions git-repository/tests/clone/mod.rs
Expand Up @@ -11,6 +11,7 @@ mod blocking_io {
use crate::remote;

#[test]
#[ignore]
fn fetch_only_with_configuration() -> crate::Result {
let tmp = git_testtools::tempfile::TempDir::new()?;
let called_configure_remote = std::sync::Arc::new(std::sync::atomic::AtomicBool::default());
Expand Down Expand Up @@ -134,6 +135,20 @@ mod blocking_io {
"local clone always adopts the name of the remote"
);

let short_name = referent.name().shorten().to_str_lossy();
assert_eq!(
repo.branch_remote_name(short_name.as_ref())
.expect("remote is set")
.as_ref(),
remote_name,
"the remote branch information is fully configured"
);
assert_eq!(
repo.branch_remote_ref(short_name.as_ref()).expect("present")?.as_bstr(),
remote_name,
"the remote branch information is fully configured"
);

{
let mut logs = referent.log_iter();
assert_reflog(logs.all());
Expand Down

0 comments on commit 07efbce

Please sign in to comment.