MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / condition_oom_killed

Function condition_oom_killed

crates/openshell-driver-podman/src/watcher.rs:411–425  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

409
410 #[test]
411 fn condition_oom_killed() {
412 let state = ContainerState {
413 status: "exited".to_string(),
414 running: false,
415 exit_code: 137,
416 oom_killed: true,
417 health: None,
418 started_at: None,
419 finished_at: Some("2026-04-14T11:00:00Z".to_string()),
420 };
421 let cond = condition_from_state(&state);
422 assert_eq!(cond.status, "False");
423 assert_eq!(cond.reason, "OOMKilled");
424 assert_eq!(cond.last_transition_time, "2026-04-14T11:00:00Z");
425 }
426
427 #[test]
428 fn condition_normal_exit() {

Callers

nothing calls this directly

Calls 1

condition_from_stateFunction · 0.85

Tested by

no test coverage detected