package logs
import "github.com/open-policy-agent/opa/test/e2e/logs"
Index ¶
- func GeneratePolicy(ruleCounts int, ruleHits int) string
- func RunDecisionLoggerBenchmark(b *testing.B, rt *e2e.TestRuntime)
- type TestLogServer
Functions ¶
func GeneratePolicy ¶
GeneratePolicy generates a policy for use in Decision Log e2e tests. The `ruleCounts` determine how many total rules to generate, and the `ruleHits` are the number of them that will be evaluated. This is keyed off of the `input.hit` boolean value.
func RunDecisionLoggerBenchmark ¶
func RunDecisionLoggerBenchmark(b *testing.B, rt *e2e.TestRuntime)
RunDecisionLoggerBenchmark runs a benchmark for decision logs with a pre-configured test runtime
Types ¶
type TestLogServer ¶
type TestLogServer struct {
// contains filtered or unexported fields
}
TestLogServer implements the decision log endpoint for e2e testing.
func (*TestLogServer) Start ¶
func (t *TestLogServer) Start()
Start the test server listening on a random port.
func (*TestLogServer) Stop ¶
func (t *TestLogServer) Stop()
Stop the test server. There is a 5 second graceful shutdown period and then it will be forcefully stopped.
func (*TestLogServer) URL ¶
func (t *TestLogServer) URL() string
URL string representation for the current server. Requires that the server has already been started.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
test/e2e/logs/console |
- Version
- v0.29.0
- Published
- May 27, 2021
- Platform
- js/wasm
- Imports
- 9 packages
- Last checked
- 2 minutes ago –
Tools for package owners.