@@ -86,6 +86,8 @@ pub enum Scenario {
8686 SimpleV1 ,
8787 /// One date, v2 manifests, MULTI_ARCH1 host
8888 MultiHost ,
89+ /// One date, v2 manifests, beta with tag
90+ BetaTag ,
8991 /// Two dates, v2 manifests, everything unavailable in second date.
9092 Unavailable ,
9193 /// Two dates, v2 manifests, RLS unavailable in first date, restored on second.
@@ -139,6 +141,7 @@ impl ConstState {
139141 Scenario :: ArchivesV2 => RwLock :: new( None ) ,
140142 Scenario :: ArchivesV2_2015_01_01 => RwLock :: new( None ) ,
141143 Scenario :: ArchivesV2TwoVersions => RwLock :: new( None ) ,
144+ Scenario :: BetaTag => RwLock :: new( None ) ,
142145 Scenario :: Empty => RwLock :: new( None ) ,
143146 Scenario :: Full => RwLock :: new( None ) ,
144147 Scenario :: HostGoesMissingBefore => RwLock :: new( None ) ,
@@ -921,6 +924,14 @@ impl Release {
921924 Release :: new ( "beta" , version, date, version)
922925 }
923926
927+ fn beta_with_tag ( tag : Option < & str > , version : & str , date : & str ) -> Self {
928+ let channel = match tag {
929+ Some ( tag) => format ! ( "{version}-beta.{tag}" ) ,
930+ None => format ! ( "{version}-beta" ) ,
931+ } ;
932+ Release :: new ( & channel, version, date, version)
933+ }
934+
924935 fn with_rls ( mut self , status : RlsStatus ) -> Self {
925936 self . rls = status;
926937 self
@@ -1093,6 +1104,13 @@ fn create_mock_dist_server(path: &Path, s: Scenario) {
10931104 Release :: beta( "1.2.0" , "2015-01-02" ) . multi_arch( ) ,
10941105 Release :: stable( "1.1.0" , "2015-01-02" ) . multi_arch( ) ,
10951106 ] ,
1107+ Scenario :: BetaTag => vec ! [
1108+ Release :: beta( "1.78.0" , "2024-03-19" ) ,
1109+ Release :: beta_with_tag( None , "1.78.0" , "2024-03-19" ) ,
1110+ Release :: beta( "1.79.0" , "2024-05-03" ) ,
1111+ Release :: beta_with_tag( Some ( "1" ) , "1.79.0" , "2024-04-29" ) ,
1112+ Release :: beta_with_tag( Some ( "2" ) , "1.79.0" , "2024-05-03" ) ,
1113+ ] ,
10961114 Scenario :: HostGoesMissingBefore => {
10971115 vec ! [ Release :: new( "nightly" , "1.3.0" , "2019-12-09" , "1" ) ]
10981116 }
@@ -1119,6 +1137,7 @@ fn create_mock_dist_server(path: &Path, s: Scenario) {
11191137 | Scenario :: ArchivesV2
11201138 | Scenario :: ArchivesV2_2015_01_01
11211139 | Scenario :: ArchivesV2TwoVersions
1140+ | Scenario :: BetaTag
11221141 | Scenario :: MultiHost
11231142 | Scenario :: Unavailable
11241143 | Scenario :: UnavailableRls
0 commit comments