| 44 | 44 | | use crate::features::dollars; |
| 45 | 45 | | use crate::limits::alert_level; |
| 46 | 46 | | |
| 47 | | − | /// Agents at once in the first month or on the trial, and after. |
| 48 | | − | pub(crate) const FIRST_MONTH_AGENTS: u32 = 2; |
| 49 | | − | pub(crate) const AGENTS: u32 = 10; |
| 47 | + | /// Sandboxes (workflow jobs, checks, the queue, deploy builds) a workspace |
| 48 | + | /// runs at once in the first month, on the free plan or the trial, and |
| 49 | + | /// after: room for a workflow's matrix and a deploy side by side, where 2 |
| 50 | + | /// and 10, sized for g1t's former hosted agents, held CI behind one another. |
| 51 | + | pub(crate) const FIRST_MONTH_AGENTS: u32 = 20; |
| 52 | + | pub(crate) const AGENTS: u32 = 40; |
| 50 | 53 | | /// The longest run in the first month or on the trial, in minutes. |
| 51 | 54 | | pub(crate) const FIRST_MONTH_MINUTES: u32 = 60; |
| 52 | 55 | | /// How long "keep going" lifts a spike's pause. |
| ⋯ |
| 1043 | 1046 | | |
| 1044 | 1047 | | #[test] |
| 1045 | 1048 | | fn caps_are_tight_in_the_first_month_and_on_the_trial() { |
| 1046 | | − | assert_eq!(caps(PlanKind::Paid, true, false, None), (2, 60)); |
| 1047 | | − | assert_eq!(caps(PlanKind::Free, false, true, None), (2, 60)); |
| 1048 | | − | assert_eq!(caps(PlanKind::Paid, false, false, None), (10, g1t_contracts::guardrails::MAX_MINUTES)); |
| 1049 | | − | assert_eq!(caps(PlanKind::Internal, false, false, None).0, 10); |
| 1049 | + | assert_eq!(caps(PlanKind::Paid, true, false, None), (20, 60)); |
| 1050 | + | assert_eq!(caps(PlanKind::Free, false, true, None), (20, 60)); |
| 1051 | + | assert_eq!(caps(PlanKind::Paid, false, false, None), (40, g1t_contracts::guardrails::MAX_MINUTES)); |
| 1052 | + | assert_eq!(caps(PlanKind::Internal, false, false, None).0, 40); |
| 1050 | 1053 | | // Staff can set agents at once. |
| 1051 | 1054 | | assert_eq!(caps(PlanKind::Paid, true, false, Some(6)).0, 6); |
| 1052 | 1055 | | } |