test: keep partial-clone fixture on native temp fs
This commit is contained in:
parent
7836f3775a
commit
31d7200862
1 changed files with 8 additions and 4 deletions
|
|
@ -389,9 +389,9 @@ fn read_remote_head(remote_url: &str, branch: &str) -> Result<String, String> {
|
|||
let output = require_success("PERSONA_REMOTE_HEAD_READ", output)?;
|
||||
let packet_trace = String::from_utf8_lossy(&output.stderr);
|
||||
if !packet_trace.lines().any(|line| {
|
||||
line.split_whitespace().any(|token| {
|
||||
token.starts_with("fetch=") && line.split_whitespace().any(|part| part == "filter")
|
||||
})
|
||||
line.split_whitespace()
|
||||
.any(|token| token.starts_with("fetch="))
|
||||
&& line.split_whitespace().any(|part| part == "filter")
|
||||
}) {
|
||||
return Err("PERSONA_REMOTE_PARTIAL_OBJECT_PROTOCOL_REQUIRED".into());
|
||||
}
|
||||
|
|
@ -665,7 +665,11 @@ mod tests {
|
|||
}
|
||||
|
||||
fn fixture() -> (TempDir, PathBuf, PathBuf, String) {
|
||||
let temp = TempDir::new().unwrap();
|
||||
let temp = if cfg!(target_family = "unix") {
|
||||
TempDir::new_in("/var/tmp").unwrap_or_else(|_| TempDir::new().unwrap())
|
||||
} else {
|
||||
TempDir::new().unwrap()
|
||||
};
|
||||
let source = temp.path().join("source");
|
||||
let remote = temp.path().join("remote.git");
|
||||
let cache = temp.path().join("cache");
|
||||
|
|
|
|||
Loading…
Reference in a new issue