Skip to content

Commit 6837b83

Browse files
committed
test: Add placeholder values to satify roundtrip tests
1 parent 2372efc commit 6837b83

1 file changed

Lines changed: 18 additions & 3 deletions

File tree

  • rust/operator-binary/src/crd

rust/operator-binary/src/crd/mod.rs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,9 +1110,12 @@ pub fn build_recommended_labels<'a, T>(
11101110

11111111
#[cfg(test)]
11121112
mod tests {
1113-
use stackable_operator::commons::product_image_selection::ResolvedProductImage;
1113+
use stackable_operator::{
1114+
commons::product_image_selection::ResolvedProductImage,
1115+
versioned::test_utils::RoundtripTestData,
1116+
};
11141117

1115-
use crate::v1alpha2::AirflowCluster;
1118+
use crate::{v1alpha1, v1alpha2};
11161119

11171120
#[test]
11181121
fn test_cluster_config() {
@@ -1146,7 +1149,7 @@ mod tests {
11461149
";
11471150

11481151
let deserializer = serde_yaml::Deserializer::from_str(cluster);
1149-
let cluster: AirflowCluster =
1152+
let cluster: v1alpha2::AirflowCluster =
11501153
serde_yaml::with::singleton_map_recursive::deserialize(deserializer).unwrap();
11511154

11521155
let resolved_airflow_image: ResolvedProductImage = cluster
@@ -1166,4 +1169,16 @@ mod tests {
11661169
// defaults to true
11671170
assert!(cluster.spec.cluster_config.database_initialization.enabled);
11681171
}
1172+
1173+
impl RoundtripTestData for v1alpha1::AirflowClusterSpec {
1174+
fn roundtrip_test_data() -> Vec<Self> {
1175+
vec![]
1176+
}
1177+
}
1178+
1179+
impl RoundtripTestData for v1alpha2::AirflowClusterSpec {
1180+
fn roundtrip_test_data() -> Vec<Self> {
1181+
vec![]
1182+
}
1183+
}
11691184
}

0 commit comments

Comments
 (0)