systemdtest

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleMockAllUnitsActiveOutput

func HandleMockAllUnitsActiveOutput(cmd []string, states map[string]ServiceState) []byte

HandleMockAllUnitsActiveOutput returns the output for systemctl in the case where units have the state as described by states. If `cmd` is the command issued by systemd.Status(), this function returns the output to be produced by the command so that the queried services will appear having the ActiveState and UnitFileState according to the data passed in the `states` map.

func HandleMockListMountUnitsOutput

func HandleMockListMountUnitsOutput(cmd []string, mounts []MountUnitInfo) ([]byte, bool)

HandleMockListMountUnitsOutput returns the output for systemctl in the case where units have the state as described by states. If `cmd` is the command issued by systemd.Status(), this function returns the output to be produced by the command so that the queried services will appear having the ActiveState and UnitFileState according to the data passed in the `states` map.

Types

type MountUnitInfo

type MountUnitInfo struct {
	Description  string
	Where        string
	FragmentPath string
}

type ServiceState

type ServiceState struct {
	ActiveState   string
	UnitFileState string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL