Skip to content

Commit

Permalink
Fix windows incompatibility with /tmp (#3252)
Browse files Browse the repository at this point in the history
  • Loading branch information
prietyc123 authored Jun 2, 2020
1 parent b85b76e commit e08aa97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/integration/operatorhub/cmd_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package integration
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strings"
Expand Down Expand Up @@ -129,7 +130,7 @@ var _ = Describe("odo service command tests for OperatorHub", func() {

// stdOut contains the yaml specification. Store it to a file
randomFileName := helper.RandString(6) + ".yaml"
fileName := filepath.Join("/tmp", randomFileName)
fileName := filepath.Join(os.TempDir(), randomFileName)
if err := ioutil.WriteFile(fileName, []byte(stdOut), 0644); err != nil {
fmt.Printf("Could not write yaml spec to file %s because of the error %v", fileName, err.Error())
}
Expand Down

0 comments on commit e08aa97

Please sign in to comment.