Move IM tests into top level tree too
This commit is contained in:
parent
b20af107dc
commit
ccdff3ba24
|
@ -1,15 +1,11 @@
|
||||||
package im
|
package nettests
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/ooni/probe-cli/nettests"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FacebookMessenger test implementation
|
// FacebookMessenger test implementation
|
||||||
type FacebookMessenger struct {
|
type FacebookMessenger struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run starts the test
|
// Run starts the test
|
||||||
func (h FacebookMessenger) Run(ctl *nettests.Controller) error {
|
func (h FacebookMessenger) Run(ctl *Controller) error {
|
||||||
builder, err := ctl.Ctx.Session.NewExperimentBuilder(
|
builder, err := ctl.Ctx.Session.NewExperimentBuilder(
|
||||||
"facebook_messenger",
|
"facebook_messenger",
|
||||||
)
|
)
|
|
@ -36,17 +36,11 @@ func TestRun(t *testing.T) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
res, err := database.CreateResult(ctx.DB, ctx.Home, tg, network.ID)
|
res, err := database.CreateResult(ctx.DB, ctx.Home, "im", network.ID)
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
builder, err := ctl.Ctx.Session.NewExperimentBuilder(
|
|
||||||
"telegram",
|
|
||||||
)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
nt := Telegram{}
|
||||||
ctl := NewController(nt, ctx, res)
|
ctl := NewController(nt, ctx, res)
|
||||||
ctl.Run(builder, []string{""})
|
|
||||||
nt.Run(ctl)
|
nt.Run(ctl)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,11 @@
|
||||||
package im
|
package nettests
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/ooni/probe-cli/nettests"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Telegram test implementation
|
// Telegram test implementation
|
||||||
type Telegram struct {
|
type Telegram struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run starts the test
|
// Run starts the test
|
||||||
func (h Telegram) Run(ctl *nettests.Controller) error {
|
func (h Telegram) Run(ctl *Controller) error {
|
||||||
builder, err := ctl.Ctx.Session.NewExperimentBuilder(
|
builder, err := ctl.Ctx.Session.NewExperimentBuilder(
|
||||||
"telegram",
|
"telegram",
|
||||||
)
|
)
|
|
@ -1,15 +1,11 @@
|
||||||
package im
|
package nettests
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/ooni/probe-cli/nettests"
|
|
||||||
)
|
|
||||||
|
|
||||||
// WhatsApp test implementation
|
// WhatsApp test implementation
|
||||||
type WhatsApp struct {
|
type WhatsApp struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run starts the test
|
// Run starts the test
|
||||||
func (h WhatsApp) Run(ctl *nettests.Controller) error {
|
func (h WhatsApp) Run(ctl *Controller) error {
|
||||||
builder, err := ctl.Ctx.Session.NewExperimentBuilder(
|
builder, err := ctl.Ctx.Session.NewExperimentBuilder(
|
||||||
"whatsapp",
|
"whatsapp",
|
||||||
)
|
)
|
Loading…
Reference in New Issue
Block a user