Fix leaky env variable causing flaky test (#3761)
This commit is contained in:
@@ -249,6 +249,11 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
#[serial]
|
#[serial]
|
||||||
fn test_model_config_context_limits() {
|
fn test_model_config_context_limits() {
|
||||||
|
// Clear all GOOSE environment variables to ensure clean test environment
|
||||||
|
with_var("GOOSE_TEMPERATURE", None::<&str>, || {
|
||||||
|
with_var("GOOSE_CONTEXT_LIMIT", None::<&str>, || {
|
||||||
|
with_var("GOOSE_TOOLSHIM", None::<&str>, || {
|
||||||
|
with_var("GOOSE_TOOLSHIM_OLLAMA_MODEL", None::<&str>, || {
|
||||||
let config = ModelConfig::new("claude-3-opus")
|
let config = ModelConfig::new("claude-3-opus")
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.with_context_limit(Some(150_000));
|
.with_context_limit(Some(150_000));
|
||||||
@@ -262,6 +267,10 @@ mod tests {
|
|||||||
|
|
||||||
let config = ModelConfig::new("unknown-model").unwrap();
|
let config = ModelConfig::new("unknown-model").unwrap();
|
||||||
assert_eq!(config.context_limit(), DEFAULT_CONTEXT_LIMIT);
|
assert_eq!(config.context_limit(), DEFAULT_CONTEXT_LIMIT);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
Reference in New Issue
Block a user