Skip to content

Commit

Permalink
ci: reset failed systemd unit on OOM test
Browse files Browse the repository at this point in the history
Signed-off-by: Luis Rascao <luis.rascao@gmail.com>
  • Loading branch information
lrascao committed Apr 3, 2023
1 parent ba61870 commit 6381ce8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/integration/events.bats
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,6 @@ function test_events() {
wait # wait for the above sub shells to finish

grep -q '{"type":"oom","id":"test_busybox"}' events.log

systemd_reset_failed
}
5 changes: 5 additions & 0 deletions tests/integration/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -620,3 +620,8 @@ function requires_kernel() {
skip "requires kernel $1"
fi
}

function systemd_reset_failed() {
[ ! -v RUNC_USE_SYSTEMD ] && return
systemctl reset-failed
}

0 comments on commit 6381ce8

Please sign in to comment.