Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mjh1 committed Jan 5, 2024
1 parent a76892a commit 458a9ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions catalyst-uploader.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func run() int {
}

// replace stdout to prevent any lib from writing debug output there
stdout := os.Stdout
os.Stdout, _ = os.Open(os.DevNull)

uri := flag.Arg(0)
Expand All @@ -57,12 +58,11 @@ func run() int {

// success, write uploaded file details to stdout
if glog.V(5) {
b, err := json.Marshal(map[string]string{"uri": uri})
err = json.NewEncoder(stdout).Encode(map[string]string{"uri": uri})
if err != nil {
glog.Fatal(err)
return 1
}

Check warning on line 65 in catalyst-uploader.go

View check run for this annotation

Codecov / codecov/patch

catalyst-uploader.go#L60-L65

Added lines #L60 - L65 were not covered by tests
glog.Info(string(b))
}

return 0
Expand Down
2 changes: 1 addition & 1 deletion catalyst-uploader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func TestFsHandlerE2E(t *testing.T) {
defer os.Remove(outFileName)

// run
uploader := exec.Command("go", "run", "catalyst-uploader.go", outFileName)
uploader := exec.Command("go", "run", "catalyst-uploader.go", "-v", "5", outFileName)
uploader.Stdin = stdinReader
stdoutRes, err := uploader.Output()
require.NoError(t, err)
Expand Down

0 comments on commit 458a9ab

Please sign in to comment.