MCPcopy Create free account
hub / github.com/containers/common / TestNewAppArmorEnabled

Function TestNewAppArmorEnabled

pkg/sysinfo/sysinfo_linux_test.go:79–87  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

77}
78
79func TestNewAppArmorEnabled(t *testing.T) {
80 // Check if AppArmor is supported. then it must be TRUE , else FALSE
81 if _, err := os.Stat("/sys/kernel/security/apparmor"); err != nil {
82 t.Skip("App Armor Must be Enabled")
83 }
84
85 sysInfo := New(true)
86 require.True(t, sysInfo.AppArmor)
87}
88
89func TestNewAppArmorDisabled(t *testing.T) {
90 // Check if AppArmor is supported. then it must be TRUE , else FALSE

Callers

nothing calls this directly

Calls 2

NewFunction · 0.70
StatMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…