github.com/ooni/oohttp@v0.7.2/internal/testenv/testenv.go (about)

     1  // Package testenv emulates some testenv properties to reduce
     2  // the amount of deleted line with respect to upstream.
     3  package testenv
     4  
     5  import (
     6  	"context"
     7  	"os/exec"
     8  	"testing"
     9  )
    10  
    11  // MustHaveExec always skips the current test.
    12  func MustHaveExec(t testing.TB) {
    13  	t.Skip("testenv.MustHaveExec is not enabled in this fork")
    14  }
    15  
    16  // SkipFlay skips a flaky test.
    17  func SkipFlaky(t testing.TB, issue int) {
    18  	t.Skip("testenv.SkipFlaky: skipping flaky test", issue)
    19  }
    20  
    21  // HasSrc always returns false.
    22  func HasSrc() bool {
    23  	return false
    24  }
    25  
    26  // GoToolPath returns the Go tool path.
    27  func GoToolPath(t testing.TB) string {
    28  	return "go"
    29  }
    30  
    31  // Builder always returns the empty string.
    32  func Builder() string {
    33  	return ""
    34  }
    35  
    36  func CommandContext(t testing.TB, ctx context.Context, name string, args ...string) *exec.Cmd {
    37  	t.Skip("testenv.CommandContext is not enabled in this fork")
    38  	return &exec.Cmd{}
    39  }