Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/commands/ext/checkout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ mod tests {
fn test_checkout_stamp_requirements() {
// ext checkout requires: SDK install + ext install (NOT build)
// Checkout is for extracting files from the installed sysroot
let requirements = vec![
let requirements = [
StampRequirement::sdk_install(),
StampRequirement::ext_install("config-files"),
];
Expand Down
2 changes: 1 addition & 1 deletion src/commands/ext/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ ext:
fn test_package_stamp_requirements() {
// ext package requires: SDK install + ext install + ext build
// Verify the stamp requirements are correct
let requirements = vec![
let requirements = [
StampRequirement::sdk_install(),
StampRequirement::ext_install("my-ext"),
StampRequirement::ext_build("my-ext"),
Expand Down
2 changes: 1 addition & 1 deletion src/commands/sdk/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ dependencies = { gcc = "*" }
use crate::utils::stamps::StampRequirement;

// sdk compile requires only: SDK install
let requirements = vec![StampRequirement::sdk_install()];
let requirements = [StampRequirement::sdk_install()];

// Verify correct stamp path
assert_eq!(requirements[0].relative_path(), "sdk/install.stamp");
Expand Down
2 changes: 1 addition & 1 deletion src/utils/image_signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ mod tests {
let test_hash = [0x42u8; 32]; // Simple test hash

// Sign the hash
let signature = secret_key.sign(&test_hash, None);
let signature = secret_key.sign(test_hash, None);

// Create signature content
let sig_content = create_signature_content(
Expand Down
4 changes: 2 additions & 2 deletions src/utils/signing_keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,10 @@ mod tests {
let hash = hasher.finalize();

// Sign the hash (this is what avocado does)
let signature = secret_key.sign(&hash, None);
let signature = secret_key.sign(hash, None);

// Verify the signature
let result = public_key.verify(&hash, &signature);
let result = public_key.verify(hash, &signature);
assert!(
result.is_ok(),
"Signature verification should succeed for SHA256 hash"
Expand Down
4 changes: 2 additions & 2 deletions src/utils/signing_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ mod tests {
// Here we're just validating the data format and verification process

// Simulate signing on the host side
let signature = secret_key.sign(&file_hash, None);
let signature = secret_key.sign(file_hash, None);

// Create signature content in the format that would be returned
let sig_content = serde_json::json!({
Expand Down Expand Up @@ -650,7 +650,7 @@ mod tests {
let reconstructed_sig = ed25519_compact::Signature::from_slice(&sig_array).unwrap();

// Verify the signature with the public key
let result = public_key.verify(&file_hash, &reconstructed_sig);
let result = public_key.verify(file_hash, &reconstructed_sig);
assert!(
result.is_ok(),
"Signature from response should be verifiable with original public key"
Expand Down
6 changes: 3 additions & 3 deletions src/utils/stamps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1610,7 +1610,7 @@ ext/my-ext/build.stamp:::null"#;
fn test_ext_package_requires_sdk_install_ext_install_ext_build() {
// ext package requires: SDK install + ext install + ext build
// This is the most demanding extension command
let reqs = vec![
let reqs = [
StampRequirement::sdk_install(),
StampRequirement::ext_install("my-ext"),
StampRequirement::ext_build("my-ext"),
Expand All @@ -1631,7 +1631,7 @@ ext/my-ext/build.stamp:::null"#;
fn test_ext_checkout_requires_sdk_install_ext_install() {
// ext checkout requires: SDK install + ext install (but NOT build)
// Checkout is for extracting files from installed sysroot
let reqs = vec![
let reqs = [
StampRequirement::sdk_install(),
StampRequirement::ext_install("my-ext"),
];
Expand All @@ -1645,7 +1645,7 @@ ext/my-ext/build.stamp:::null"#;
fn test_sdk_compile_requires_sdk_install() {
// sdk compile requires: SDK install only
// Compile runs scripts in the SDK container after packages are installed
let reqs = vec![StampRequirement::sdk_install()];
let reqs = [StampRequirement::sdk_install()];

assert_eq!(reqs.len(), 1);
assert_eq!(reqs[0].fix_command(), "avocado sdk install");
Expand Down
Loading