Skip to content

Commit

Permalink
improve test names, add visual representation
Browse files Browse the repository at this point in the history
  • Loading branch information
turbolent committed May 1, 2024
1 parent 57b84eb commit 8133e7f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions runtime/sema/entitlementset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ func TestEntitlementSet_MinimallyRepresentable(t *testing.T) {
func TestEntitlementSet_Access(t *testing.T) {
t.Parallel()

t.Run("no entitlements, no disjunctions", func(t *testing.T) {
t.Run("no entitlements, no disjunctions: {} = unauthorized", func(t *testing.T) {
t.Parallel()

set := &EntitlementSet{}
Expand All @@ -462,7 +462,7 @@ func TestEntitlementSet_Access(t *testing.T) {
assert.Equal(t, UnauthorizedAccess, access)
})

t.Run("entitlements, no disjunctions", func(t *testing.T) {
t.Run("entitlements, no disjunctions: {E1, E2} = auth(E1, E2)", func(t *testing.T) {
t.Parallel()

set := &EntitlementSet{}
Expand Down Expand Up @@ -494,7 +494,7 @@ func TestEntitlementSet_Access(t *testing.T) {
)
})

t.Run("no entitlements, one disjunction", func(t *testing.T) {
t.Run("no entitlements, one disjunction: {(E1 | E2)} = auth(E1 | E2)", func(t *testing.T) {
t.Parallel()

set := &EntitlementSet{}
Expand Down Expand Up @@ -525,7 +525,7 @@ func TestEntitlementSet_Access(t *testing.T) {
)
})

t.Run("no entitlements, two disjunctions", func(t *testing.T) {
t.Run("no entitlements, two disjunctions: {(E1 | E2), (E2 | E3)} = auth(E1, E2, E3)", func(t *testing.T) {
t.Parallel()

set := &EntitlementSet{}
Expand Down Expand Up @@ -578,7 +578,7 @@ func TestEntitlementSet_Access(t *testing.T) {
)
})

t.Run("entitlement, one disjunction, minimal", func(t *testing.T) {
t.Run("entitlement, one disjunction, not minimal: {E1, (E2 | E3)} = auth(E1, E2, E3)", func(t *testing.T) {
t.Parallel()

set := &EntitlementSet{}
Expand Down Expand Up @@ -623,7 +623,7 @@ func TestEntitlementSet_Access(t *testing.T) {
)
})

t.Run("entitlement, one disjunction, not minimal", func(t *testing.T) {
t.Run("entitlement, one disjunction, minimal: {(E1 | E2), E1} = auth(E1)", func(t *testing.T) {
t.Parallel()

set := &EntitlementSet{}
Expand Down

0 comments on commit 8133e7f

Please sign in to comment.