mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
fix(feature) UnderDevelopment feature must be off (#11242)
## Summary 1. Bump RemoteModels to Stable 2. Assert that all UnderDevelopment features are off by default ## Testing - [x] Added unit test
This commit is contained in:
committed by
GitHub
Unverified
parent
481145e959
commit
d65f09b913
@@ -498,7 +498,7 @@ pub const FEATURES: &[FeatureSpec] = &[
|
||||
FeatureSpec {
|
||||
id: Feature::RemoteModels,
|
||||
key: "remote_models",
|
||||
stage: Stage::UnderDevelopment,
|
||||
stage: Stage::Stable,
|
||||
default_enabled: true,
|
||||
},
|
||||
FeatureSpec {
|
||||
@@ -633,3 +633,23 @@ pub fn maybe_push_unstable_features_warning(
|
||||
msg: EventMsg::Warning(WarningEvent { message }),
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
#[test]
|
||||
fn under_development_features_are_disabled_by_default() {
|
||||
for spec in FEATURES {
|
||||
if matches!(spec.stage, Stage::UnderDevelopment) {
|
||||
assert_eq!(
|
||||
spec.default_enabled, false,
|
||||
"feature `{}` is under development and must be disabled by default",
|
||||
spec.key
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user