@@ -360,7 +360,7 @@ func (s *deviceMgrInstallModeSuite) SetUpTest(c *C) {
360360 })
361361 s .AddCleanup (restore )
362362
363- mockHelperForEncryptionAvailabilityCheck (s , c , false , false )
363+ mockHelperForEncryptionAvailabilityCheck (s , c , false , false , "" )
364364
365365 s .state .Lock ()
366366 defer s .state .Unlock ()
@@ -648,7 +648,7 @@ func (s *deviceMgrInstallModeSuite) doRunChangeTestWithEncryption(c *C, grade st
648648 })
649649 defer restore ()
650650
651- callCnt := mockHelperForEncryptionAvailabilityCheck (s , c , false , tc .tpm )
651+ callCnt := mockHelperForEncryptionAvailabilityCheck (s , c , false , tc .tpm , "" )
652652
653653 if tc .trustedBootloader {
654654 tab := bootloadertest .Mock ("trusted" , bootloaderRootdir ).WithTrustedAssets ()
@@ -1781,7 +1781,7 @@ func (s *deviceMgrInstallModeSuite) TestInstallBootloaderVarSetFails(c *C) {
17811781 })
17821782 defer restore ()
17831783
1784- callCnt := mockHelperForEncryptionAvailabilityCheck (s , c , false , false )
1784+ callCnt := mockHelperForEncryptionAvailabilityCheck (s , c , false , false , "" )
17851785
17861786 err := os .WriteFile (filepath .Join (dirs .GlobalRootDir , "/var/lib/snapd/modeenv" ),
17871787 []byte ("mode=install\n recovery_system=1234" ), 0644 )
@@ -1823,7 +1823,7 @@ func (s *deviceMgrInstallModeSuite) testInstallEncryptionValidityChecks(c *C, er
18231823 restore := release .MockOnClassic (false )
18241824 defer restore ()
18251825
1826- callCnt := mockHelperForEncryptionAvailabilityCheck (s , c , false , true )
1826+ callCnt := mockHelperForEncryptionAvailabilityCheck (s , c , false , true , "" )
18271827
18281828 err := os .WriteFile (filepath .Join (dirs .GlobalRootDir , "/var/lib/snapd/modeenv" ),
18291829 []byte ("mode=install\n " ), 0644 )
@@ -2010,7 +2010,7 @@ func (s *deviceMgrInstallModeSuite) TestInstallWithEncryptionValidatesGadgetErr(
20102010 defer restore ()
20112011
20122012 // pretend we have a TPM
2013- callCnt := mockHelperForEncryptionAvailabilityCheck (s , c , false , true )
2013+ callCnt := mockHelperForEncryptionAvailabilityCheck (s , c , false , true , "" )
20142014
20152015 // must be a model that requires encryption to error
20162016 s .testInstallGadgetNoSave (c , "secured" )
@@ -2041,7 +2041,7 @@ func (s *deviceMgrInstallModeSuite) TestInstallWithEncryptionValidatesGadgetWarn
20412041 defer restore ()
20422042
20432043 // pretend we have a TPM
2044- callCnt := mockHelperForEncryptionAvailabilityCheck (s , c , false , true )
2044+ callCnt := mockHelperForEncryptionAvailabilityCheck (s , c , false , true , "" )
20452045
20462046 s .testInstallGadgetNoSave (c , "dangerous" )
20472047
@@ -2067,7 +2067,7 @@ func (s *deviceMgrInstallModeSuite) TestInstallWithoutEncryptionValidatesGadgetW
20672067 defer restore ()
20682068
20692069 // pretend we have a TPM
2070- callCnt := mockHelperForEncryptionAvailabilityCheck (s , c , false , true )
2070+ callCnt := mockHelperForEncryptionAvailabilityCheck (s , c , false , true , "" )
20712071
20722072 s .testInstallGadgetNoSave (c , "dangerous" )
20732073
@@ -2146,7 +2146,7 @@ func (s *deviceMgrInstallModeSuite) TestInstallCheckEncrypted(c *C) {
21462146 makeInstalledMockKernelSnap (c , st , kernelYamlNoFdeSetup )
21472147 }
21482148
2149- callCnt := mockHelperForEncryptionAvailabilityCheck (s , c , false , tc .hasTPM )
2149+ callCnt := mockHelperForEncryptionAvailabilityCheck (s , c , false , tc .hasTPM , "" )
21502150
21512151 encryptionType , err := devicestate .DeviceManagerCheckEncryption (s .mgr , st , deviceCtx , secboot .TPMProvisionFull )
21522152 c .Assert (callCnt .checkCnt , Equals , 0 )
@@ -2314,7 +2314,7 @@ func (s *deviceMgrInstallModeSuite) doRunFactoryResetChange(c *C, model *asserts
23142314 })
23152315 defer restore ()
23162316
2317- callCnt := mockHelperForEncryptionAvailabilityCheck (s , c , false , tc .tpm )
2317+ callCnt := mockHelperForEncryptionAvailabilityCheck (s , c , false , tc .tpm , "" )
23182318
23192319 if tc .trustedBootloader {
23202320 tab := bootloadertest .Mock ("trusted" , bootloaderRootdir ).WithTrustedAssets ()
@@ -3135,7 +3135,7 @@ func (s *deviceMgrInstallModeSuite) TestFactoryResetExpectedTasks(c *C) {
31353135 restore := release .MockOnClassic (false )
31363136 defer restore ()
31373137
3138- callCnt := mockHelperForEncryptionAvailabilityCheck (s , c , false , false )
3138+ callCnt := mockHelperForEncryptionAvailabilityCheck (s , c , false , false , "" )
31393139
31403140 restore = devicestate .MockInstallFactoryReset (func (mod gadget.Model , gadgetRoot string , kernelSnapInfo * install.KernelSnapInfo , device string , options install.Options , obs gadget.ContentObserver , pertTimings timings.Measurer ) (* install.InstalledSystemSideData , error ) {
31413141 c .Assert (os .MkdirAll (dirs .SnapDeviceDirUnder (filepath .Join (dirs .GlobalRootDir , "/run/mnt/ubuntu-data/system-data" )), 0755 ), IsNil )
@@ -3207,7 +3207,7 @@ func (s *deviceMgrInstallModeSuite) TestFactoryResetInstallDeviceHook(c *C) {
32073207 restore := release .MockOnClassic (false )
32083208 defer restore ()
32093209
3210- callCnt := mockHelperForEncryptionAvailabilityCheck (s , c , false , false )
3210+ callCnt := mockHelperForEncryptionAvailabilityCheck (s , c , false , false , "" )
32113211
32123212 hooksCalled := []* hookstate.Context {}
32133213 restore = hookstate .MockRunHook (func (ctx * hookstate.Context , tomb * tomb.Tomb ) ([]byte , error ) {
0 commit comments