style: gofmt

This commit is contained in:
Jakub Zych
2026-11-05 01:00:36 +01:00
parent 9c11b7064d
commit 6d14f71ae5
15 changed files with 116 additions and 115 deletions

View File

@@ -91,9 +91,9 @@ func TestAllowsScope(t *testing.T) {
p: dev, scope: &bouncer.ScopeLimit{Full: true}, required: nil, want: true,
},
{
name: "plugin scope with owner grant",
p: dev,
scope: &bouncer.ScopeLimit{Scopes: [][]string{{"acme.demo.*"}}},
name: "plugin scope with owner grant",
p: dev,
scope: &bouncer.ScopeLimit{Scopes: [][]string{{"acme.demo.*"}}},
required: []string{"acme.demo.access"}, want: true,
},
{
@@ -106,27 +106,27 @@ func TestAllowsScope(t *testing.T) {
required: []string{"acme.demo.access"}, want: false,
},
{
name: "superuser with scoped token limited",
p: super,
scope: &bouncer.ScopeLimit{Scopes: [][]string{{"acme.demo.reports"}}},
name: "superuser with scoped token limited",
p: super,
scope: &bouncer.ScopeLimit{Scopes: [][]string{{"acme.demo.reports"}}},
required: []string{"acme.demo.access"}, want: false,
},
{
name: "superuser scoped token matching scope code",
p: super,
scope: &bouncer.ScopeLimit{Scopes: [][]string{{"acme.demo.reports"}}},
name: "superuser scoped token matching scope code",
p: super,
scope: &bouncer.ScopeLimit{Scopes: [][]string{{"acme.demo.reports"}}},
required: []string{"acme.demo.reports"}, want: true,
},
{
name: "empty requirement list refused unless full",
p: dev,
scope: &bouncer.ScopeLimit{Scopes: [][]string{{"acme.demo.*"}}},
name: "empty requirement list refused unless full",
p: dev,
scope: &bouncer.ScopeLimit{Scopes: [][]string{{"acme.demo.*"}}},
required: nil, want: false,
},
{
name: "multi-code literal: one scope must match every code",
p: dev,
scope: &bouncer.ScopeLimit{Scopes: [][]string{{"acme.demo.*"}}},
name: "multi-code literal: one scope must match every code",
p: dev,
scope: &bouncer.ScopeLimit{Scopes: [][]string{{"acme.demo.*"}}},
required: []string{"acme.demo.access", "acme.demo.reports"}, want: true,
},
{
@@ -148,9 +148,9 @@ func TestAllowsScope(t *testing.T) {
required: []string{"acme.demo.*"}, want: true,
},
{
name: "wildcard requirement equal pattern full",
p: dev,
scope: &bouncer.ScopeLimit{Scopes: [][]string{{"acme.demo.*"}}},
name: "wildcard requirement equal pattern full",
p: dev,
scope: &bouncer.ScopeLimit{Scopes: [][]string{{"acme.demo.*"}}},
required: []string{"acme.demo.*"}, want: true,
},
{