Skip to content

Commit

Permalink
fix: failing opa client tests
Browse files Browse the repository at this point in the history
Signed-off-by: nscuro <[email protected]>
  • Loading branch information
nscuro committed Sep 7, 2024
1 parent aef04c0 commit eef2d6b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/opa/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"net/http"
"os"
"testing"
"time"

"github.com/stretchr/testify/require"
"github.com/testcontainers/testcontainers-go"
Expand All @@ -16,7 +17,7 @@ import (
func TestClient_Decision(t *testing.T) {
opaURL := setupOPA(t)

client, err := NewClient(opaURL)
client, err := NewClient(opaURL, 5*time.Second)
require.NoError(t, err)

t.Run("Match", func(t *testing.T) {
Expand Down Expand Up @@ -49,7 +50,7 @@ func TestClient_Decision(t *testing.T) {

func setupOPA(t *testing.T) string {
req := testcontainers.ContainerRequest{
Image: "openpolicyagent/opa:0.61.0",
Image: "openpolicyagent/opa:0.68.0",
Cmd: []string{"run", "--server"},
ExposedPorts: []string{"8181/tcp"},
WaitingFor: wait.ForLog("Initializing server"),
Expand Down

0 comments on commit eef2d6b

Please sign in to comment.