Skip to content

Commit

Permalink
ci: improve debug logging for e2e tests (#649)
Browse files Browse the repository at this point in the history
  • Loading branch information
miampf authored Jun 27, 2024
1 parent b03624d commit c87d26c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cli/cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ func generatePolicyForFile(ctx context.Context, genpolicyPath, regoPath, policyP
fmt.Sprintf("--yaml-file=%s", yamlPath),
}
genpolicy := exec.CommandContext(ctx, genpolicyPath, args...)
genpolicy.Env = append(genpolicy.Env, "RUST_LOG=info")
genpolicy.Env = append(genpolicy.Env, "RUST_LOG=info", "RUST_BACKTRACE=1")

logFilter := newLogTranslator(logger)
defer logFilter.stop()
Expand Down
1 change: 1 addition & 0 deletions e2e/internal/contrasttest/contrasttest.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ func (ct *ContrastTest) Generate(t *testing.T) {

generate := cmd.NewGenerateCmd()
generate.Flags().String("workspace-dir", "", "") // Make generate aware of root flags
generate.Flags().String("log-level", "debug", "")
generate.SetArgs(args)
generate.SetOut(io.Discard)
errBuf := &bytes.Buffer{}
Expand Down

0 comments on commit c87d26c

Please sign in to comment.