refactor: move tunnel pkg down one level (#358)
* refactor: move tunnel pkg down one level While there, reduce unnecessary dependency on external packages. * file I forgot to commit
This commit is contained in:
parent
39aec6677d
commit
3cb6c7c6fb
21 changed files with 69 additions and 65 deletions
17
internal/tunnel/session_test.go
Normal file
17
internal/tunnel/session_test.go
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
package tunnel
|
||||
|
||||
import "context"
|
||||
|
||||
// MockableSession is a mockable session.
|
||||
type MockableSession struct {
|
||||
// Result contains the bytes of the psiphon config.
|
||||
Result []byte
|
||||
|
||||
// Err is the error, if any.
|
||||
Err error
|
||||
}
|
||||
|
||||
// FetchPsiphonConfig implements ExperimentSession.FetchPsiphonConfig
|
||||
func (sess *MockableSession) FetchPsiphonConfig(ctx context.Context) ([]byte, error) {
|
||||
return sess.Result, sess.Err
|
||||
}
|
||||
Loading…
Reference in a new issue