Skip to content

Commit

Permalink
cmd/fmt/internal/env: test failure case output
Browse files Browse the repository at this point in the history
Signed-off-by: Colin Lacy <colinjlacy@gmail.com>
  • Loading branch information
colinjlacy committed Jan 22, 2024
1 parent c185cb8 commit b997f94
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmd/internal/env/env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"bytes"
"fmt"
"io"
"os"
"strings"
"testing"

Expand Down Expand Up @@ -112,8 +111,7 @@ func TestCmdFlagsImpl_CheckEnvironmentVariables_ChildCommandAllEnvVars(t *testin
t.Setenv("OPA_CHILD_SECOND_STRING", "testing child")
t.Setenv("OPA_CHILD_SECOND_BOOL", "false")
if err := child.PreRunE(child, []string{}); err != nil {
fmt.Fprintf(os.Stdout, "unexpected error: %s", err.Error())
t.Fatalf("BONK")
t.Fatalf("unexpected error: %s", err.Error())
}
child.Run(child, []string{})
childOut := childWriter.String()
Expand Down

0 comments on commit b997f94

Please sign in to comment.