2018-05-16 15:26:11 +00:00
|
|
|
package tests
|
2018-05-10 21:29:16 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"strings"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestProtocolInfo(t *testing.T) {
|
2018-05-14 18:11:18 +00:00
|
|
|
ctx := NewTestContext(t, nil)
|
|
|
|
defer ctx.Close()
|
|
|
|
info, err := ctx.Control.ProtocolInfo()
|
2018-05-10 21:29:16 +00:00
|
|
|
ctx.Require.NoError(err)
|
2018-05-14 18:11:18 +00:00
|
|
|
ctx.Require.Contains(info.AuthMethods, "SAFECOOKIE")
|
2018-05-10 21:29:16 +00:00
|
|
|
ctx.Require.True(strings.HasPrefix(info.TorVersion, "0.3"))
|
|
|
|
}
|