@@ -86,6 +86,8 @@ pub enum Scenario {
86
86
SimpleV1 ,
87
87
/// One date, v2 manifests, MULTI_ARCH1 host
88
88
MultiHost ,
89
+ /// One date, v2 manifests, beta with tag
90
+ BetaTag ,
89
91
/// Two dates, v2 manifests, everything unavailable in second date.
90
92
Unavailable ,
91
93
/// Two dates, v2 manifests, RLS unavailable in first date, restored on second.
@@ -139,6 +141,7 @@ impl ConstState {
139
141
Scenario :: ArchivesV2 => RwLock :: new( None ) ,
140
142
Scenario :: ArchivesV2_2015_01_01 => RwLock :: new( None ) ,
141
143
Scenario :: ArchivesV2TwoVersions => RwLock :: new( None ) ,
144
+ Scenario :: BetaTag => RwLock :: new( None ) ,
142
145
Scenario :: Empty => RwLock :: new( None ) ,
143
146
Scenario :: Full => RwLock :: new( None ) ,
144
147
Scenario :: HostGoesMissingBefore => RwLock :: new( None ) ,
@@ -921,6 +924,14 @@ impl Release {
921
924
Release :: new ( "beta" , version, date, version)
922
925
}
923
926
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
+
924
935
fn with_rls ( mut self , status : RlsStatus ) -> Self {
925
936
self . rls = status;
926
937
self
@@ -1093,6 +1104,13 @@ fn create_mock_dist_server(path: &Path, s: Scenario) {
1093
1104
Release :: beta( "1.2.0" , "2015-01-02" ) . multi_arch( ) ,
1094
1105
Release :: stable( "1.1.0" , "2015-01-02" ) . multi_arch( ) ,
1095
1106
] ,
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
+ ] ,
1096
1114
Scenario :: HostGoesMissingBefore => {
1097
1115
vec ! [ Release :: new( "nightly" , "1.3.0" , "2019-12-09" , "1" ) ]
1098
1116
}
@@ -1119,6 +1137,7 @@ fn create_mock_dist_server(path: &Path, s: Scenario) {
1119
1137
| Scenario :: ArchivesV2
1120
1138
| Scenario :: ArchivesV2_2015_01_01
1121
1139
| Scenario :: ArchivesV2TwoVersions
1140
+ | Scenario :: BetaTag
1122
1141
| Scenario :: MultiHost
1123
1142
| Scenario :: Unavailable
1124
1143
| Scenario :: UnavailableRls
0 commit comments