Skip to content

Commit

Permalink
Add t.parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
kate-osborn committed Aug 14, 2024
1 parent 39c29be commit cd41898
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
20 changes: 20 additions & 0 deletions internal/mode/static/state/graph/reference_grant_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (
)

func TestReferenceGrantResolver(t *testing.T) {
t.Parallel()

gwNs := "gw-ns"
secretNsName := types.NamespacedName{Namespace: "test", Name: "certificate"}

Expand Down Expand Up @@ -161,6 +163,8 @@ func TestReferenceGrantResolver(t *testing.T) {

for _, test := range tests {
t.Run(test.msg, func(t *testing.T) {
t.Parallel()

g := NewWithT(t)

g.Expect(resolver.refAllowed(test.to, test.from)).To(Equal(test.allowed))
Expand All @@ -169,6 +173,8 @@ func TestReferenceGrantResolver(t *testing.T) {
}

func TestToSecret(t *testing.T) {
t.Parallel()

ref := toSecret(types.NamespacedName{Namespace: "ns", Name: "secret"})

exp := toResource{
Expand All @@ -182,6 +188,8 @@ func TestToSecret(t *testing.T) {
}

func TestToService(t *testing.T) {
t.Parallel()

ref := toService(types.NamespacedName{Namespace: "ns", Name: "service"})

exp := toResource{
Expand All @@ -195,6 +203,8 @@ func TestToService(t *testing.T) {
}

func TestFromGateway(t *testing.T) {
t.Parallel()

ref := fromGateway("ns")

exp := fromResource{
Expand All @@ -208,6 +218,8 @@ func TestFromGateway(t *testing.T) {
}

func TestFromHTTPRoute(t *testing.T) {
t.Parallel()

ref := fromHTTPRoute("ns")

exp := fromResource{
Expand All @@ -221,6 +233,8 @@ func TestFromHTTPRoute(t *testing.T) {
}

func TestFromGRPCRoute(t *testing.T) {
t.Parallel()

ref := fromGRPCRoute("ns")

exp := fromResource{
Expand All @@ -234,6 +248,8 @@ func TestFromGRPCRoute(t *testing.T) {
}

func TestFromTLSRoute(t *testing.T) {
t.Parallel()

ref := fromTLSRoute("ns")

exp := fromResource{
Expand All @@ -247,6 +263,8 @@ func TestFromTLSRoute(t *testing.T) {
}

func TestRefAllowedFrom(t *testing.T) {
t.Parallel()

gwNs := "gw-ns"
hrNs := "hr-ns"
grNs := "gr-ns"
Expand Down Expand Up @@ -397,6 +415,8 @@ func TestRefAllowedFrom(t *testing.T) {

for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
t.Parallel()

g := NewWithT(t)
g.Expect(test.refAllowedFrom(test.toResource)).To(Equal(test.expAllowed))
})
Expand Down
4 changes: 4 additions & 0 deletions internal/mode/static/state/graph/tlsroute_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ func createTLSRoute(
}

func TestBuildTLSRoute(t *testing.T) {
t.Parallel()

parentRef := gatewayv1.ParentReference{
Namespace: helpers.GetPointer[gatewayv1.Namespace]("test"),
Name: "gateway",
Expand Down Expand Up @@ -551,6 +553,8 @@ func TestBuildTLSRoute(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
g := NewWithT(t)
t.Parallel()

r := buildTLSRoute(
test.gtr,
test.gatewayNsNames,
Expand Down

0 comments on commit cd41898

Please sign in to comment.