For some reason all of a sudden these were flagged by the latest/stable go snap
in CI:
Checking for ineffective assignments
/home/runner/work/snapd/snapd/src/github.com/snapcore/snapd/interfaces/repo_test.go:2088:2: ineffectual assignment to conn
/home/runner/work/snapd/snapd/src/github.com/snapcore/snapd/interfaces/hotplug/deviceinfo_test.go:88:2: ineffectual assignment to di
/home/runner/work/snapd/snapd/src/github.com/snapcore/snapd/overlord/devicestate/devicestate_serial_test.go:664:2: ineffectual assignment to device
Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
Also some drive-bys:
* gadget: eliminate setUpWritableFallback and mockProcSelfFilesystem helpers and
just use osutil.MockMountInfo instead
* overlord: eliminate restoreBackends and TearDownTest, use AddCleanup from
testutil.BaseTest instead
* selinux/tests: eliminate test about failing to read MountInfo, this is now
hard to mock and isn't generally likely to happen unless procfs is not
mounted, so just drop this test
* selinux: eliminate selinux.MockMountInfo and use osutil.MockMountInfo instead
Signed-off-by: Ian Johnson <ian.johnson@canonical.com>