Versions in this module Expand all Collapse all v0 v0.1.0 Nov 12, 2022 v0.0.1 Nov 10, 2022 Changes in this version + const HookYaml + const PlugNoAppsYaml + const SambaYamlV1 + const SambaYamlV1Core20Base + const SambaYamlV1NoSlot + const SambaYamlV1WithNmbd + const SambaYamlV1WithNmbdNoSlot + const SambaYamlV2 + const SambaYamlWithHook + const SlotNoAppsYaml + const SomeSnapYamlV1 + var DefaultInitializeOpts = &interfaces.SecurityBackendOptions + type BackendSuite struct + Backend interfaces.SecurityBackend + Iface *TestInterface + Repo *interfaces.Repository + RootDir string + func (s *BackendSuite) InstallSnap(c *C, opts interfaces.ConfinementOptions, instanceName, snapYaml string, ...) *snap.Info + func (s *BackendSuite) RemoveSnap(c *C, snapInfo *snap.Info) + func (s *BackendSuite) SetUpTest(c *C) + func (s *BackendSuite) TearDownTest(c *C) + func (s *BackendSuite) UpdateSnap(c *C, oldSnapInfo *snap.Info, opts interfaces.ConfinementOptions, ...) *snap.Info + type Specification struct + Snippets []string + func (spec *Specification) AddConnectedPlug(iface interfaces.Interface, plug *interfaces.ConnectedPlug, ...) error + func (spec *Specification) AddConnectedSlot(iface interfaces.Interface, plug *interfaces.ConnectedPlug, ...) error + func (spec *Specification) AddPermanentPlug(iface interfaces.Interface, plug *snap.PlugInfo) error + func (spec *Specification) AddPermanentSlot(iface interfaces.Interface, slot *snap.SlotInfo) error + func (spec *Specification) AddSnippet(snippet string) + type TestHotplugInterface struct + HandledByGadgetCallback func(deviceInfo *hotplug.HotplugDeviceInfo, slot *snap.SlotInfo) bool + HotplugDeviceDetectedCallback func(deviceInfo *hotplug.HotplugDeviceInfo) (*hotplug.ProposedSlot, error) + HotplugKeyCallback func(deviceInfo *hotplug.HotplugDeviceInfo) (snap.HotplugKey, error) + func (t *TestHotplugInterface) HandledByGadget(deviceInfo *hotplug.HotplugDeviceInfo, slot *snap.SlotInfo) bool + func (t *TestHotplugInterface) HotplugDeviceDetected(deviceInfo *hotplug.HotplugDeviceInfo) (*hotplug.ProposedSlot, error) + func (t *TestHotplugInterface) HotplugKey(deviceInfo *hotplug.HotplugDeviceInfo) (snap.HotplugKey, error) + type TestInterface struct + AppArmorConnectedPlugCallback func(spec *apparmor.Specification, plug *interfaces.ConnectedPlug, ...) error + AppArmorConnectedSlotCallback func(spec *apparmor.Specification, plug *interfaces.ConnectedPlug, ...) error + AppArmorPermanentPlugCallback func(spec *apparmor.Specification, plug *snap.PlugInfo) error + AppArmorPermanentSlotCallback func(spec *apparmor.Specification, slot *snap.SlotInfo) error + AutoConnectCallback func(*snap.PlugInfo, *snap.SlotInfo) bool + BeforeConnectPlugCallback func(plug *interfaces.ConnectedPlug) error + BeforeConnectSlotCallback func(slot *interfaces.ConnectedSlot) error + BeforePreparePlugCallback func(plug *snap.PlugInfo) error + BeforePrepareSlotCallback func(slot *snap.SlotInfo) error + DBusConnectedPlugCallback func(spec *dbus.Specification, plug *interfaces.ConnectedPlug, ...) error + DBusConnectedSlotCallback func(spec *dbus.Specification, plug *interfaces.ConnectedPlug, ...) error + DBusPermanentPlugCallback func(spec *dbus.Specification, plug *snap.PlugInfo) error + DBusPermanentSlotCallback func(spec *dbus.Specification, slot *snap.SlotInfo) error + InterfaceName string + InterfaceStaticInfo interfaces.StaticInfo + KModConnectedPlugCallback func(spec *kmod.Specification, plug *interfaces.ConnectedPlug, ...) error + KModConnectedSlotCallback func(spec *kmod.Specification, plug *interfaces.ConnectedPlug, ...) error + KModPermanentPlugCallback func(spec *kmod.Specification, plug *snap.PlugInfo) error + KModPermanentSlotCallback func(spec *kmod.Specification, slot *snap.SlotInfo) error + MountConnectedPlugCallback func(spec *mount.Specification, plug *interfaces.ConnectedPlug, ...) error + MountConnectedSlotCallback func(spec *mount.Specification, plug *interfaces.ConnectedPlug, ...) error + MountPermanentPlugCallback func(spec *mount.Specification, plug *snap.PlugInfo) error + MountPermanentSlotCallback func(spec *mount.Specification, slot *snap.SlotInfo) error + PolkitConnectedPlugCallback func(spec *polkit.Specification, plug *interfaces.ConnectedPlug, ...) error + PolkitConnectedSlotCallback func(spec *polkit.Specification, plug *interfaces.ConnectedPlug, ...) error + PolkitPermanentPlugCallback func(spec *polkit.Specification, plug *snap.PlugInfo) error + PolkitPermanentSlotCallback func(spec *polkit.Specification, slot *snap.SlotInfo) error + SecCompConnectedPlugCallback func(spec *seccomp.Specification, plug *interfaces.ConnectedPlug, ...) error + SecCompConnectedSlotCallback func(spec *seccomp.Specification, plug *interfaces.ConnectedPlug, ...) error + SecCompPermanentPlugCallback func(spec *seccomp.Specification, plug *snap.PlugInfo) error + SecCompPermanentSlotCallback func(spec *seccomp.Specification, slot *snap.SlotInfo) error + SystemdConnectedPlugCallback func(spec *systemd.Specification, plug *interfaces.ConnectedPlug, ...) error + SystemdConnectedSlotCallback func(spec *systemd.Specification, plug *interfaces.ConnectedPlug, ...) error + SystemdPermanentPlugCallback func(spec *systemd.Specification, plug *snap.PlugInfo) error + SystemdPermanentSlotCallback func(spec *systemd.Specification, slot *snap.SlotInfo) error + TestConnectedPlugCallback func(spec *Specification, plug *interfaces.ConnectedPlug, ...) error + TestConnectedSlotCallback func(spec *Specification, plug *interfaces.ConnectedPlug, ...) error + TestPermanentPlugCallback func(spec *Specification, plug *snap.PlugInfo) error + TestPermanentSlotCallback func(spec *Specification, slot *snap.SlotInfo) error + UDevConnectedPlugCallback func(spec *udev.Specification, plug *interfaces.ConnectedPlug, ...) error + UDevConnectedSlotCallback func(spec *udev.Specification, plug *interfaces.ConnectedPlug, ...) error + UDevPermanentPlugCallback func(spec *udev.Specification, plug *snap.PlugInfo) error + UDevPermanentSlotCallback func(spec *udev.Specification, slot *snap.SlotInfo) error + func (t *TestInterface) AppArmorConnectedPlug(spec *apparmor.Specification, plug *interfaces.ConnectedPlug, ...) error + func (t *TestInterface) AppArmorConnectedSlot(spec *apparmor.Specification, plug *interfaces.ConnectedPlug, ...) error + func (t *TestInterface) AppArmorPermanentPlug(spec *apparmor.Specification, plug *snap.PlugInfo) error + func (t *TestInterface) AppArmorPermanentSlot(spec *apparmor.Specification, slot *snap.SlotInfo) error + func (t *TestInterface) AutoConnect(plug *snap.PlugInfo, slot *snap.SlotInfo) bool + func (t *TestInterface) BeforeConnectPlug(plug *interfaces.ConnectedPlug) error + func (t *TestInterface) BeforeConnectSlot(slot *interfaces.ConnectedSlot) error + func (t *TestInterface) BeforePreparePlug(plug *snap.PlugInfo) error + func (t *TestInterface) BeforePrepareSlot(slot *snap.SlotInfo) error + func (t *TestInterface) DBusConnectedPlug(spec *dbus.Specification, plug *interfaces.ConnectedPlug, ...) error + func (t *TestInterface) DBusConnectedSlot(spec *dbus.Specification, plug *interfaces.ConnectedPlug, ...) error + func (t *TestInterface) DBusPermanentPlug(spec *dbus.Specification, plug *snap.PlugInfo) error + func (t *TestInterface) DBusPermanentSlot(spec *dbus.Specification, slot *snap.SlotInfo) error + func (t *TestInterface) KModConnectedPlug(spec *kmod.Specification, plug *interfaces.ConnectedPlug, ...) error + func (t *TestInterface) KModConnectedSlot(spec *kmod.Specification, plug *interfaces.ConnectedPlug, ...) error + func (t *TestInterface) KModPermanentPlug(spec *kmod.Specification, plug *snap.PlugInfo) error + func (t *TestInterface) KModPermanentSlot(spec *kmod.Specification, slot *snap.SlotInfo) error + func (t *TestInterface) MountConnectedPlug(spec *mount.Specification, plug *interfaces.ConnectedPlug, ...) error + func (t *TestInterface) MountConnectedSlot(spec *mount.Specification, plug *interfaces.ConnectedPlug, ...) error + func (t *TestInterface) MountPermanentPlug(spec *mount.Specification, plug *snap.PlugInfo) error + func (t *TestInterface) MountPermanentSlot(spec *mount.Specification, slot *snap.SlotInfo) error + func (t *TestInterface) Name() string + func (t *TestInterface) PolkitConnectedPlug(spec *polkit.Specification, plug *interfaces.ConnectedPlug, ...) error + func (t *TestInterface) PolkitConnectedSlot(spec *polkit.Specification, plug *interfaces.ConnectedPlug, ...) error + func (t *TestInterface) PolkitPermanentPlug(spec *polkit.Specification, plug *snap.PlugInfo) error + func (t *TestInterface) PolkitPermanentSlot(spec *polkit.Specification, slot *snap.SlotInfo) error + func (t *TestInterface) SecCompConnectedPlug(spec *seccomp.Specification, plug *interfaces.ConnectedPlug, ...) error + func (t *TestInterface) SecCompConnectedSlot(spec *seccomp.Specification, plug *interfaces.ConnectedPlug, ...) error + func (t *TestInterface) SecCompPermanentPlug(spec *seccomp.Specification, plug *snap.PlugInfo) error + func (t *TestInterface) SecCompPermanentSlot(spec *seccomp.Specification, slot *snap.SlotInfo) error + func (t *TestInterface) StaticInfo() interfaces.StaticInfo + func (t *TestInterface) String() string + func (t *TestInterface) SystemdConnectedPlug(spec *systemd.Specification, plug *interfaces.ConnectedPlug, ...) error + func (t *TestInterface) SystemdConnectedSlot(spec *systemd.Specification, plug *interfaces.ConnectedPlug, ...) error + func (t *TestInterface) SystemdPermanentPlug(spec *systemd.Specification, plug *snap.PlugInfo) error + func (t *TestInterface) SystemdPermanentSlot(spec *systemd.Specification, slot *snap.SlotInfo) error + func (t *TestInterface) TestConnectedPlug(spec *Specification, plug *interfaces.ConnectedPlug, ...) error + func (t *TestInterface) TestConnectedSlot(spec *Specification, plug *interfaces.ConnectedPlug, ...) error + func (t *TestInterface) TestPermanentPlug(spec *Specification, plug *snap.PlugInfo) error + func (t *TestInterface) TestPermanentSlot(spec *Specification, slot *snap.SlotInfo) error + func (t *TestInterface) UDevConnectedPlug(spec *udev.Specification, plug *interfaces.ConnectedPlug, ...) error + func (t *TestInterface) UDevConnectedSlot(spec *udev.Specification, plug *interfaces.ConnectedPlug, ...) error + func (t *TestInterface) UDevPermanentPlug(spec *udev.Specification, plug *snap.PlugInfo) error + func (t *TestInterface) UDevPermanentSlot(spec *udev.Specification, slot *snap.SlotInfo) error + type TestSecurityBackend struct + BackendName interfaces.SecuritySystem + RemoveCallback func(snapName string) error + RemoveCalls []string + SandboxFeaturesCallback func() []string + SetupCallback func(snapInfo *snap.Info, opts interfaces.ConfinementOptions, ...) error + SetupCalls []TestSetupCall + func (b *TestSecurityBackend) Initialize(*interfaces.SecurityBackendOptions) error + func (b *TestSecurityBackend) Name() interfaces.SecuritySystem + func (b *TestSecurityBackend) NewSpecification() interfaces.Specification + func (b *TestSecurityBackend) Remove(snapName string) error + func (b *TestSecurityBackend) SandboxFeatures() []string + func (b *TestSecurityBackend) Setup(snapInfo *snap.Info, opts interfaces.ConfinementOptions, ...) error + type TestSecurityBackendDiscardingLate struct + RemoveLateCallback func(snapName string, rev snap.Revision, typ snap.Type) error + RemoveLateCalledFor [][]string + func (b *TestSecurityBackendDiscardingLate) RemoveLate(snapName string, rev snap.Revision, typ snap.Type) error + type TestSecurityBackendSetupMany struct + SetupManyCallback func(snapInfo []*snap.Info, ...) []error + SetupManyCalls []TestSetupManyCall + func (b *TestSecurityBackendSetupMany) SetupMany(snaps []*snap.Info, ...) []error + type TestSetupCall struct + Options interfaces.ConfinementOptions + SnapInfo *snap.Info + type TestSetupManyCall struct + SnapInfos []*snap.Info