v0.32.6_fix2
This commit is contained in:
1 parent
e1ac899ec0
commit
fc8711d4d8
39 files changed
+695
-232
No files matched your search
+13
-1
@@ -1663,7 +1663,7 @@ mod tests {
|
||||
assert_eq!(
|
||||
initial["refresh"],
|
||||
json!({
|
||||
"live_enabled":true, "overview_seconds":2, "traffic_seconds":5,
|
||||
"live_enabled":true, "overview_seconds":3, "traffic_seconds":5,
|
||||
"cache_seconds":5, "system_info_seconds":60
|
||||
})
|
||||
);
|
||||
@@ -2914,6 +2914,13 @@ mod tests {
|
||||
assert_eq!(live.status(), StatusCode::OK);
|
||||
let live = json_body(live).await;
|
||||
assert!(live.get("metrics").is_some());
|
||||
// Compact snapshots contain only already-collected data required for
|
||||
// fast Overview charts, not the expensive System details document.
|
||||
assert!(live["live_system"].get("sampled_at_ms").is_some());
|
||||
assert!(live["live_system"].get("process_cpu_percent").is_some());
|
||||
assert!(live["live_system"].get("process_rss_bytes").is_some());
|
||||
assert!(live["live_system"].get("network_interfaces").is_some());
|
||||
assert!(live["live_system"].get("open_fds").is_none());
|
||||
assert!(live.get("backend_pools").is_some());
|
||||
assert!(live["listeners"].get("active_endpoints").is_some());
|
||||
assert!(live.get("system").is_none());
|
||||
@@ -2966,6 +2973,7 @@ mod tests {
|
||||
assert_eq!(partial.traffic_seconds, 0);
|
||||
assert_eq!(partial.system_info_seconds, 60);
|
||||
assert!(validate_admin_preferences(&loaded).is_ok());
|
||||
assert_eq!(loaded.refresh.overview_seconds, 3);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -2975,6 +2983,10 @@ mod tests {
|
||||
value.overview_seconds = seconds;
|
||||
assert!(validate_refresh_preferences(&value).is_err());
|
||||
}
|
||||
value.overview_seconds = 3;
|
||||
assert!(validate_refresh_preferences(&value).is_ok());
|
||||
value.overview_seconds = 2; // previous installations stay valid
|
||||
assert!(validate_refresh_preferences(&value).is_ok());
|
||||
value.overview_seconds = 1;
|
||||
for seconds in [1, 2, 4, 31] {
|
||||
value.traffic_seconds = seconds;
|
||||
|
||||
Reference in new issue
Block a user