refactor(tunnel): simplify tor implementation (#290)

Simplify interaction within the package by avoiding to have
a tor specific config. Use a Config instead.

Part of https://github.com/ooni/probe/issues/985.
This commit is contained in:
Simone Basso 2021-04-03 21:25:08 +02:00 committed by GitHub
commit d9aff19be5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 109 additions and 92 deletions

View file

@ -26,7 +26,7 @@ func TestPsiphonFetchPsiphonConfigFailure(t *testing.T) {
}
}
func TestPsiphonMakeMkdirAllFailure(t *testing.T) {
func TestPsiphonMkdirAllFailure(t *testing.T) {
expected := errors.New("mocked error")
sess := &mockable.Session{
MockableFetchPsiphonConfigResult: []byte(`{}`),
@ -45,7 +45,7 @@ func TestPsiphonMakeMkdirAllFailure(t *testing.T) {
}
}
func TestPsiphonMakeRemoveAllFailure(t *testing.T) {
func TestPsiphonRemoveAllFailure(t *testing.T) {
expected := errors.New("mocked error")
sess := &mockable.Session{
MockableFetchPsiphonConfigResult: []byte(`{}`),
@ -64,7 +64,7 @@ func TestPsiphonMakeRemoveAllFailure(t *testing.T) {
}
}
func TestPsiphonMakeStartFailure(t *testing.T) {
func TestPsiphonStartFailure(t *testing.T) {
expected := errors.New("mocked error")
sess := &mockable.Session{
MockableFetchPsiphonConfigResult: []byte(`{}`),