field_ios

In-the-field app for Radroots on iOS
git clone https://radroots.dev/git/field_ios.git
Log | Files | Refs | README | LICENSE

capacity_tests.rs (1362B)


      1 use super::*;
      2 use tera_core::runtime::product_surface::{
      3     ComposerPersistenceError, SubmissionCommitError, SubmissionReservationError,
      4 };
      5 
      6 #[test]
      7 fn capacity_errors_never_claim_retry_or_rollback_and_preserve_original_recovery() {
      8     let errors: Vec<TeraAppError> = vec![
      9         ComposerPersistenceError::Storage(radroots_storage::Error::SpaceInsufficient).into(),
     10         SubmissionCommitError::Storage(radroots_storage::Error::SpaceInsufficient).into(),
     11         SubmissionReservationError::Storage(radroots_storage::Error::SpaceInsufficient).into(),
     12         TodayError::Storage(radroots_storage::Error::SpaceInsufficient).into(),
     13         TodayError::InboundMedia(Phase1InboundMediaError::SpaceInsufficient).into(),
     14         Phase1DraftError::SpaceInsufficient.into(),
     15         SettingsError::SpaceInsufficient.into(),
     16     ];
     17     for error in errors {
     18         let TeraAppError::Failure { report } = error;
     19         assert_eq!(report.code, "storage_space_insufficient");
     20         assert!(!report.retryable);
     21         assert!(
     22             report
     23                 .recovery_actions
     24                 .iter()
     25                 .any(|action| action == "reconcile_original_operation")
     26         );
     27         assert!(
     28             report
     29                 .recovery_actions
     30                 .iter()
     31                 .any(|action| action == "preserve_local_work")
     32         );
     33     }
     34 }