7172e750dd
* fix(session): make sure tunnel code is tested Part of https://github.com/ooni/probe/issues/985 * fix: add missing TunnelDir for correctness
21 lines
398 B
Go
21 lines
398 B
Go
// +build !ooni_psiphon_config
|
|
|
|
package engine
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
"testing"
|
|
)
|
|
|
|
func TestEarlySessionNoPsiphonFetchPsiphonConfig(t *testing.T) {
|
|
s := &sessionTunnelEarlySession{}
|
|
out, err := s.FetchPsiphonConfig(context.Background())
|
|
if !errors.Is(err, errPsiphonNoEmbeddedConfig) {
|
|
t.Fatal("not the error we expected", err)
|
|
}
|
|
if out != nil {
|
|
t.Fatal("expected nil here")
|
|
}
|
|
}
|