Documentation
¶
Overview ¶
Package runtimeprobe provides utilities for runtime_probe tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenericTest ¶
func GenericTest(ctx context.Context, s *testing.State, categories []string, getComponents GetComponentsFunc, allowExtraComponents bool)
GenericTest probes components with category |categories| on a device using Runtime Probe D-Bus call and checks if the result matches the host info labels. If there is not a valid component label, the test will be skipped (pass). If a valid component in the host info labels is not probed, the test will fail. If a probed component is not in the host info labels, the test will fail if |allowExtraComponents| is false. Otherwise, the test will pass.
Types ¶
type Component ¶
type Component interface { GetName() string GetInformation() *rppb.Information }
Component represents runtime_probe component interface.
type GetComponentsFunc ¶
type GetComponentsFunc func(result *rppb.ProbeResult, category string) ([]Component, error)
GetComponentsFunc represents the function to get specific category of components from rppb.ProbeResult.