cleanup: mark more integration tests as !short mode (#755)

The objective is to make PR checks run much faster.

See https://github.com/ooni/probe/issues/2113 for context.

Regarding netxlite's tests:

Checking for every commit on master or on a release branch is
good enough and makes pull requests faster than one minute since
netxlite for windows is now 1m slower than coverage.

We're losing some coverage but coverage from integration tests
is not so good anyway, so I'm not super sad about this loss.
This commit is contained in:
Simone Basso
2022-05-24 21:01:15 +02:00
committed by GitHub
parent 6924d1ad81
commit d922bd9afc
28 changed files with 143 additions and 70 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ func TestListenError(t *testing.T) {
}
}
func TestStarTLS(t *testing.T) {
func TestStartTLS(t *testing.T) {
expected := errors.New("mocked error")
t.Run("when we cannot create a new authority", func(t *testing.T) {
+8
View File
@@ -16,6 +16,9 @@ func ensureWeStartOverWithIPTables() {
}
func TestNoCommand(t *testing.T) {
if testing.Short() {
t.Skip("skip test in short mode")
}
if runtime.GOOS != "linux" {
t.Skip("skip test on non Linux systems")
}
@@ -30,6 +33,9 @@ func TestNoCommand(t *testing.T) {
}
func TestWithCommand(t *testing.T) {
if testing.Short() {
t.Skip("skip test in short mode")
}
if runtime.GOOS != "linux" {
t.Skip("skip test on non Linux systems")
}
@@ -54,6 +60,7 @@ func TestMustx(t *testing.T) {
t.Fatal("should not happen")
}
})
t.Run("with non-exit-code error", func(t *testing.T) {
var (
called int
@@ -70,6 +77,7 @@ func TestMustx(t *testing.T) {
t.Fatal("unexpected exitcode value")
}
})
t.Run("with exit-code error", func(t *testing.T) {
var (
called int
@@ -27,6 +27,9 @@ func TestRedirect(t *testing.T) {
}
func TestIgnore(t *testing.T) {
if testing.Short() {
t.Skip("skip test in short mode")
}
server := newresolver(t, nil, nil, []string{"ooni.nu"})
iotimeout := "i/o timeout"
checkrequest(t, server, "hkgmetadb.ooni.nu", "hijacked", &iotimeout)