Skip to content

Commit cfaa9d2

Browse files
committed
fix test_validate_ok unit test that was broken on release rc branch
1 parent eb1a56c commit cfaa9d2

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

rust/operator-binary/src/controller/validate.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ mod tests {
270270

271271
use super::{ErrorDiscriminants, validate};
272272
use crate::{
273+
built_info,
273274
controller::{ContextNames, ValidatedCluster, ValidatedLogging, ValidatedOpenSearchConfig},
274275
crd::{
275276
NodeRoles,
@@ -294,9 +295,15 @@ mod tests {
294295
Some(ValidatedCluster::new(
295296
ResolvedProductImage {
296297
product_version: "3.1.0".to_owned(),
297-
app_version_label_value: LabelValue::from_str("3.1.0-stackable0.0.0-dev")
298-
.expect("should be a valid label value"),
299-
image: "oci.stackable.tech/sdp/opensearch:3.1.0-stackable0.0.0-dev".to_string(),
298+
app_version_label_value: LabelValue::from_str(&format!(
299+
"3.1.0-stackable{pkg_version}",
300+
pkg_version = built_info::PKG_VERSION
301+
))
302+
.expect("should be a valid label value"),
303+
image: format!(
304+
"oci.stackable.tech/sdp/opensearch:3.1.0-stackable{pkg_version}",
305+
pkg_version = built_info::PKG_VERSION
306+
),
300307
image_pull_policy: "Always".to_owned(),
301308
pull_secrets: None,
302309
},

0 commit comments

Comments
 (0)