tree: 16b56e0ab3a1acae7bcdcab6de47e5b3a78162b0 [search]
  1. src/
  2. BUILD.bazel
  3. BUILD.gn
  4. README.md
src/sys/pkg/testing/mock-reboot/README.md

A test helper that creates a mock reboot service which responds based on a caller-provided function.

Usage

BUILD.gn

Nothing special, other than including this crate:

  deps = [
    "//src/sys/pkg/testing/mock-reboot",
  ]

In tests

See the tests in src/lib.rs for examples of using this crate in various scenarios, including making reboot calls succeed, fail, or act on external data.