Skip to content

Commit

Permalink
test: Update to Rego v1 + add explicit --addr param for OPA fixture. (#…
Browse files Browse the repository at this point in the history
…96)

Signed-off-by: Philip Conrad <philip@chariot-chaser.net>
  • Loading branch information
philipaconrad authored Jan 8, 2025
1 parent 7364cba commit 6b5e7d7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/SmokeTest.Tests/OPAContainerFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public async Task InitializeAsync()
"testdata/condfail.rego",
"testdata/data.json"
};
string[] opaCmd = { "run", "--server" };
string[] opaCmd = { "run", "--server", "--addr=0.0.0.0:8181" };
var startupCommand = new List<string>().Concat(opaCmd).Concat(startupFiles).ToArray();

// Create a new instance of a container.
Expand Down
6 changes: 4 additions & 2 deletions test/SmokeTest.Tests/testdata/simple/system.rego
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package system

import rego.v1

# This is used to exercise the default query functionality.

msg := "this is the default path"

main := x {
main := x if {
x := {"msg": msg, "echo": input}
} else {
} else if {
x := {"msg": msg}
}
2 changes: 2 additions & 0 deletions test/SmokeTest.Tests/testdata/weird_name.rego
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package this["is/allowed"].pkg

import rego.v1

allow := true

0 comments on commit 6b5e7d7

Please sign in to comment.