cleanup(shellx): do not directly depend on apex/log (#357)

This commit is contained in:
Simone Basso 2021-06-04 14:02:18 +02:00 committed by GitHub
commit 39aec6677d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 52 additions and 39 deletions

View file

@ -6,6 +6,7 @@ import (
"runtime"
"testing"
"github.com/apex/log"
"github.com/ooni/probe-cli/v3/internal/cmd/jafar/iptables"
"github.com/ooni/probe-cli/v3/internal/shellx"
)
@ -74,7 +75,7 @@ func TestMustx(t *testing.T) {
called int
exitcode int
)
err := shellx.Run("curl", "-sf", "") // cause exitcode == 3
err := shellx.Run(log.Log, "curl", "-sf", "") // cause exitcode == 3
mustx(err, "", func(ec int) {
called++
exitcode = ec