We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8cb587d commit 202706eCopy full SHA for 202706e
internal/log/approved_file_log.go
@@ -34,9 +34,9 @@ func GetApprovedFileLoggerInstance() *approvedFileLog {
34
return instance
35
}
36
37
-func checkForRunningSubsectionOfTests() bool {
+func isFullTestRun() bool {
38
runFlag := flag.Lookup("test.run")
39
- return runFlag != nil && runFlag.Value.String() != ""
+ return runFlag == nil || runFlag.Value.String() == ""
40
41
42
func (l approvedFileLog) initializeFile() {
@@ -45,7 +45,7 @@ func (l approvedFileLog) initializeFile() {
45
46
fileFlags := os.O_RDWR | os.O_CREATE | os.O_TRUNC
47
48
- if checkForRunningSubsectionOfTests() {
+ if !isFullTestRun() {
49
fileFlags = os.O_APPEND
50
51
0 commit comments