Skip to content

Commit 7d25782

Browse files
committed
Fix tests
1 parent ef4d6ed commit 7d25782

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

tools/flakeguard/cmd/run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ func handleCmdLineArgsEdgeCase(outputMgr *outputManager, failedTests []reports.T
546546
"Final results will be based on the initial run only. " +
547547
"To enable reruns, use 'go test . -run TestPattern' instead of 'go test <file.go>' within your --test-cmd."
548548
log.Warn().Msg(warningMsg)
549-
outputMgr.detail(warningMsg)
549+
outputMgr.detail("%s", warningMsg)
550550
return true
551551
}
552552
return false

tools/flakeguard/runner/runner_integration_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ func TestRunIntegration(t *testing.T) {
176176
absProjectPath, err := filepath.Abs(tc.cfg.ProjectPath)
177177
require.NoError(t, err)
178178

179+
tempDir, err := os.MkdirTemp("", "flakeguard-test")
180+
require.NoError(t, err)
181+
179182
testRunner := runner.NewRunner(
180183
absProjectPath,
181184
false,
@@ -191,6 +194,7 @@ func TestRunIntegration(t *testing.T) {
191194
tc.cfg.SelectTests,
192195
tc.cfg.IgnoreSubtestErr,
193196
tc.cfg.OmitOutputs,
197+
tempDir,
194198
nil, // Use default executor
195199
nil, // Use default parser
196200
)

tools/flakeguard/runner/runner_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ func TestRunner_RunTestPackages(t *testing.T) {
186186
nil, // selectTests
187187
tc.expectedParseArgs.cfg.IgnoreParentFailuresOnSubtests,
188188
tc.expectedParseArgs.cfg.OmitOutputsOnSuccess,
189+
"",
189190
mockExec,
190191
mockParse,
191192
)
@@ -310,6 +311,7 @@ func TestRunner_RunTestCmd(t *testing.T) {
310311
tc.runCount, nil, false, "", nil, false, "", tc.failFast, nil, nil,
311312
tc.expectedParseArgs.cfg.IgnoreParentFailuresOnSubtests,
312313
tc.expectedParseArgs.cfg.OmitOutputsOnSuccess,
314+
"",
313315
mockExec, mockParse,
314316
)
315317

@@ -433,7 +435,9 @@ func TestRunner_RerunFailedTests(t *testing.T) {
433435
}
434436
mockParse := &mockParser{}
435437

436-
r := runner.NewRunner(".", false, 0, nil, false, "", nil, false, "", false, nil, nil, false, false, mockExec, mockParse)
438+
r := runner.NewRunner(".", false, 0, nil, false, "", nil, false, "", false, nil, nil, false, false,
439+
"",
440+
mockExec, mockParse)
437441

438442
actualResults, _, err := r.RerunFailedTests(tc.initialFailedTests, tc.rerunCount)
439443

0 commit comments

Comments
 (0)