snapstatetest

package
v0.0.0-...-2de8dde Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MockDeviceContext

func MockDeviceContext(deviceCtx snapstate.DeviceContext) (restore func())

func MockDeviceModel

func MockDeviceModel(model *asserts.Model) (restore func())

func MockDeviceModelAndMode

func MockDeviceModelAndMode(model *asserts.Model, systemMode string) (restore func())

func ReplaceDeviceCtxHook

func ReplaceDeviceCtxHook(deviceCtxHook func(st *state.State, task *state.Task, providedDeviceCtx snapstate.DeviceContext) (snapstate.DeviceContext, error)) (restore func())

func ReplaceRemodelingHook

func ReplaceRemodelingHook(remodelingHook func(st *state.State) bool) (restore func())

func UseFallbackDeviceModel

func UseFallbackDeviceModel() (restore func())

Types

type TrivialDeviceContext

type TrivialDeviceContext struct {
	DeviceModel    *asserts.Model
	OldDeviceModel *asserts.Model
	Remodeling     bool
	CtxStore       snapstate.StoreService
	SysMode        string
	Ground         bool
}

func (*TrivialDeviceContext) Base

func (dc *TrivialDeviceContext) Base() string

func (*TrivialDeviceContext) Classic

func (dc *TrivialDeviceContext) Classic() bool

func (*TrivialDeviceContext) ForRemodeling

func (dc *TrivialDeviceContext) ForRemodeling() bool

func (*TrivialDeviceContext) GroundContext

func (dc *TrivialDeviceContext) GroundContext() snapstate.DeviceContext

func (*TrivialDeviceContext) HasModeenv

func (dc *TrivialDeviceContext) HasModeenv() bool

func (*TrivialDeviceContext) Kernel

func (dc *TrivialDeviceContext) Kernel() string

func (*TrivialDeviceContext) Model

func (dc *TrivialDeviceContext) Model() *asserts.Model

func (*TrivialDeviceContext) RunMode

func (dc *TrivialDeviceContext) RunMode() bool

func (*TrivialDeviceContext) Store

func (*TrivialDeviceContext) SystemMode

func (dc *TrivialDeviceContext) SystemMode() string

Jump to

Keyboard shortcuts

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