Skip to content

Commit 490559b

Browse files
committed
fix: add missing schema_version and oci_labels fields to test constructors
1 parent dc6a7bd commit 490559b

3 files changed

Lines changed: 15 additions & 1 deletion

File tree

src/deployment/contract.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,8 @@ mod tests {
326326
base_image: "ubuntu:24.04".into(),
327327
native_deps: NativeDepsContract::default(),
328328
image_profile: ImageProfile::default(),
329+
schema_version: 2,
330+
oci_labels: OciLabels::default(),
329331
};
330332
let json = contract.to_json();
331333
assert!(json.contains("test-app"));
@@ -353,6 +355,8 @@ mod tests {
353355
base_image: "ubuntu:24.04".into(),
354356
native_deps: NativeDepsContract::default(),
355357
image_profile: ImageProfile::default(),
358+
schema_version: 2,
359+
oci_labels: OciLabels::default(),
356360
};
357361
let json = contract.to_json();
358362
let parsed: DeploymentContract = serde_json::from_str(&json).unwrap();
@@ -381,6 +385,8 @@ mod tests {
381385
base_image: "ubuntu:24.04".into(),
382386
native_deps: NativeDepsContract::default(),
383387
image_profile: ImageProfile::default(),
388+
schema_version: 2,
389+
oci_labels: OciLabels::default(),
384390
};
385391
assert_eq!(contract.binary(), "my-app");
386392
}
@@ -406,6 +412,8 @@ mod tests {
406412
base_image: "ubuntu:24.04".into(),
407413
native_deps: NativeDepsContract::default(),
408414
image_profile: ImageProfile::default(),
415+
schema_version: 2,
416+
oci_labels: OciLabels::default(),
409417
};
410418
assert_eq!(contract.config_filename(), "loader.yaml");
411419
assert_eq!(contract.config_dir(), "/etc/dfe");

src/deployment/generate.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,9 @@ fn write_file(path: impl AsRef<Path>, content: &str) -> Result<(), DeploymentErr
12801280
#[cfg(test)]
12811281
mod tests {
12821282
use super::*;
1283-
use crate::deployment::contract::{PortContract, SecretEnvContract, SecretGroupContract};
1283+
use crate::deployment::contract::{
1284+
OciLabels, PortContract, SecretEnvContract, SecretGroupContract,
1285+
};
12841286
use crate::deployment::keda::KedaContract;
12851287
use crate::deployment::native_deps::NativeDepsContract;
12861288

@@ -1328,6 +1330,8 @@ mod tests {
13281330
base_image: "ubuntu:24.04".into(),
13291331
native_deps: NativeDepsContract::default(),
13301332
image_profile: ImageProfile::default(),
1333+
schema_version: 2,
1334+
oci_labels: OciLabels::default(),
13311335
}
13321336
}
13331337

src/deployment/validate.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,8 @@ mod tests {
409409
base_image: "ubuntu:24.04".into(),
410410
native_deps: super::super::NativeDepsContract::default(),
411411
image_profile: super::super::ImageProfile::default(),
412+
schema_version: 2,
413+
oci_labels: super::super::OciLabels::default(),
412414
}
413415
}
414416

0 commit comments

Comments
 (0)