Skip to content

Commit 588ef72

Browse files
committed
agdcslog: imp naming
1 parent edfb0c6 commit 588ef72

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

internal/agdcslog/agdcslog_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,14 @@ func requireIntegration(tb testing.TB) {
4242
}
4343
}
4444

45-
// requireLogReader skips the test unless there is a system log reader.
46-
func requireLogReader(tb testing.TB, cmd string) {
45+
// requireExec skips the test if the executable is not in the PATH environment
46+
// variable or the provided path does not exist.
47+
func requireExec(tb testing.TB, name string) {
4748
tb.Helper()
4849

49-
_, err := exec.LookPath(cmd)
50+
_, err := exec.LookPath(name)
5051
if err != nil {
51-
tb.Skipf("skipping: no system log reader: %s", cmd)
52+
tb.Skipf("skipping: executable %q not found on PATH", name)
5253
}
5354
}
5455

@@ -80,7 +81,7 @@ func requireEventuallyFound(
8081
tb.Helper()
8182

8283
requireIntegration(tb)
83-
requireLogReader(tb, cmdLogReader)
84+
requireExec(tb, cmdLogReader)
8485

8586
l := integrationSystemLogger(tb)
8687
msg := strconv.FormatInt(time.Now().UnixNano(), 10)

0 commit comments

Comments
 (0)