Skip to content

Commit

Permalink
Fix test failures on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
kylewlacy committed Jun 8, 2024
1 parent c631909 commit ad5b745
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
16 changes: 16 additions & 0 deletions crates/brioche-core/tests/brioche_test/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,22 @@ pub fn sha256(value: impl AsRef<[u8]>) -> brioche_core::Hash {
hasher.finish().unwrap()
}

pub fn default_process_x86_64_linux() -> ProcessRecipe {
ProcessRecipe {
command: ProcessTemplate { components: vec![] },
args: vec![],
env: BTreeMap::new(),
dependencies: vec![],
work_dir: Box::new(WithMeta::without_meta(Recipe::Directory(
Directory::default(),
))),
output_scaffold: None,
platform: brioche_core::platform::Platform::X86_64Linux,
is_unsafe: false,
networking: false,
}
}

pub fn default_process() -> ProcessRecipe {
ProcessRecipe {
command: ProcessTemplate { components: vec![] },
Expand Down
4 changes: 2 additions & 2 deletions crates/brioche-core/tests/sync_from_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async fn test_sync_from_registry_complete_process() -> anyhow::Result<()> {
command: tpl("/usr/bin/env"),
args: vec![tpl("sh"), tpl("-c"), tpl("dummy_recipe")],
platform: brioche_core::platform::Platform::X86_64Linux,
..brioche_test::default_process()
..brioche_test::default_process_x86_64_linux()
};
let complete_process_recipe: brioche_core::recipe::CompleteProcessRecipe =
process_recipe.clone().try_into()?;
Expand Down Expand Up @@ -81,7 +81,7 @@ async fn test_sync_from_registry_process() -> anyhow::Result<()> {
command: tpl("/usr/bin/env"),
args: vec![tpl("sh"), tpl("-c"), tpl("dummy_recipe")],
platform: brioche_core::platform::Platform::X86_64Linux,
..brioche_test::default_process()
..brioche_test::default_process_x86_64_linux()
};
let process_recipe_hash = Recipe::Process(process_recipe.clone()).hash();

Expand Down
2 changes: 1 addition & 1 deletion crates/brioche-core/tests/sync_to_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async fn test_sync_to_registry_process_and_complete_process() -> anyhow::Result<
command: tpl("/usr/bin/env"),
args: vec![tpl("sh"), tpl("-c"), tpl("dummy_recipe")],
platform: brioche_core::platform::Platform::X86_64Linux,
..brioche_test::default_process()
..brioche_test::default_process_x86_64_linux()
};
let process_recipe_hash = Recipe::Process(process_recipe.clone()).hash();
let complete_process_recipe: brioche_core::recipe::CompleteProcessRecipe =
Expand Down

0 comments on commit ad5b745

Please # to comment.