mirror of
https://github.com/token2/snapd.git
synced 2026-03-13 11:15:47 -07:00
overlord/devicestate: move the helper around
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
This commit is contained in:
@@ -1218,6 +1218,14 @@ func (m *DeviceManager) Ensure() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ResetToPostBootState is only useful for integration testing.
|
||||
func (m *DeviceManager) ResetToPostBootState() {
|
||||
osutil.MustBeTestBinary("ResetToPostBootState can only be called from tests")
|
||||
m.bootOkRan = false
|
||||
m.bootRevisionsUpdated = false
|
||||
m.ensureTriedRecoverySystemRan = false
|
||||
}
|
||||
|
||||
var errNoSaveSupport = errors.New("no save directory before UC20")
|
||||
|
||||
// withSaveDir invokes a function making sure save dir is available.
|
||||
@@ -1773,11 +1781,3 @@ func (h fdeSetupHandler) Done() error {
|
||||
func (h fdeSetupHandler) Error(err error) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ResetToPostBootState is only useful for integration testing.
|
||||
func (m *DeviceManager) ResetToPostBootState() {
|
||||
osutil.MustBeTestBinary("ResetToPostBootState can only be called from tests")
|
||||
m.bootOkRan = false
|
||||
m.bootRevisionsUpdated = false
|
||||
m.ensureTriedRecoverySystemRan = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user