Fix all errcheck linter issues

Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
2026-03-15 10:36:35 -07:00
parent 87b7323367
commit d0b1875dbb
13 changed files with 71 additions and 71 deletions

View File

@@ -22,9 +22,9 @@ func setupPolicy(t *testing.T) (*Engine, func()) {
}
b := barrier.NewAESGCMBarrier(database)
mek, _ := crypto.GenerateKey()
b.Unseal(mek)
_ = b.Unseal(mek)
e := NewEngine(b)
return e, func() { database.Close() }
return e, func() { _ = database.Close() }
}
func TestAdminBypass(t *testing.T) {
@@ -113,7 +113,7 @@ func TestPolicyPriorityOrder(t *testing.T) {
ctx := context.Background()
// Lower priority number = higher priority. Deny should win.
e.CreateRule(ctx, &Rule{
_ = e.CreateRule(ctx, &Rule{
ID: "allow-rule",
Priority: 200,
Effect: EffectAllow,
@@ -121,7 +121,7 @@ func TestPolicyPriorityOrder(t *testing.T) {
Resources: []string{"engine/transit/*"},
Actions: []string{"write"},
})
e.CreateRule(ctx, &Rule{
_ = e.CreateRule(ctx, &Rule{
ID: "deny-rule",
Priority: 100,
Effect: EffectDeny,
@@ -146,7 +146,7 @@ func TestPolicyUsernameMatch(t *testing.T) {
defer cleanup()
ctx := context.Background()
e.CreateRule(ctx, &Rule{
_ = e.CreateRule(ctx, &Rule{
ID: "user-specific",
Priority: 100,
Effect: EffectAllow,