We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39df8df commit ce02972Copy full SHA for ce02972
1 file changed
rust/operator-binary/src/controller/mod.rs
@@ -526,3 +526,20 @@ impl HasUid for ValidatedCluster {
526
self.uid.clone()
527
}
528
529
+
530
+#[cfg(test)]
531
+mod tests {
532
+ use strum::IntoEnumIterator;
533
534
+ use super::ValidatedCluster;
535
+ use crate::crd::AirflowRole;
536
537
+ /// Locks the invariant behind the `expect` in [`ValidatedCluster::role_name`]: every
538
+ /// `AirflowRole` variant (present and future) must serialise to a valid `RoleName`.
539
+ #[test]
540
+ fn every_airflow_role_serialises_to_a_valid_role_name() {
541
+ for role in AirflowRole::iter() {
542
+ ValidatedCluster::role_name(&role);
543
+ }
544
545
+}
0 commit comments