Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
stefannegele committed Nov 17, 2023
1 parent 61d5d76 commit debfb5c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions quality_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package datacontract
import (
"errors"
"fmt"
"log"
"os"
"os/exec"
"strings"
Expand Down Expand Up @@ -243,6 +244,11 @@ func mockSodaCLI(wantedArguments []string) func(cmd *exec.Cmd) (res []byte, err
func checkFileNameArgument(cmd *exec.Cmd) error {
fileName := cmd.Args[len(cmd.Args)-1]
expectedPrefix := fmt.Sprintf("%v%v", os.TempDir(), "quality-checks-")

log.Println(fileName)
log.Println(expectedPrefix)
log.Println(os.TempDir())

if !strings.HasPrefix(fileName, expectedPrefix) {
return fmt.Errorf("unwanted quality checks filename argument: %v", fileName)
}
Expand Down

0 comments on commit debfb5c

Please sign in to comment.