summaryrefslogtreecommitdiffhomepage
path: root/ipn/ipnlocal/local_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'ipn/ipnlocal/local_test.go')
-rw-r--r--ipn/ipnlocal/local_test.go41
1 files changed, 0 insertions, 41 deletions
diff --git a/ipn/ipnlocal/local_test.go b/ipn/ipnlocal/local_test.go
index 48dee16af..b608be492 100644
--- a/ipn/ipnlocal/local_test.go
+++ b/ipn/ipnlocal/local_test.go
@@ -5,11 +5,9 @@
package ipnlocal
import (
- "bytes"
"fmt"
"net/http"
"reflect"
- "sync"
"testing"
"time"
@@ -434,45 +432,6 @@ func (panicOnUseTransport) RoundTrip(*http.Request) (*http.Response, error) {
panic("unexpected HTTP request")
}
-var nl = []byte("\n")
-
-func TestStartsInNeedsLoginState(t *testing.T) {
- var (
- mu sync.Mutex
- logBuf bytes.Buffer
- )
- logf := func(format string, a ...interface{}) {
- mu.Lock()
- defer mu.Unlock()
- fmt.Fprintf(&logBuf, format, a...)
- if !bytes.HasSuffix(logBuf.Bytes(), nl) {
- logBuf.Write(nl)
- }
- }
- store := new(ipn.MemoryStore)
- eng, err := wgengine.NewFakeUserspaceEngine(logf, 0)
- if err != nil {
- t.Fatalf("NewFakeUserspaceEngine: %v", err)
- }
- lb, err := NewLocalBackend(logf, "logid", store, eng)
- if err != nil {
- t.Fatalf("NewLocalBackend: %v", err)
- }
-
- lb.SetHTTPTestClient(&http.Client{
- Transport: panicOnUseTransport{}, // validate we don't send HTTP requests
- })
-
- if err := lb.Start(ipn.Options{
- StateKey: ipn.GlobalDaemonStateKey,
- }); err != nil {
- t.Fatalf("Start: %v", err)
- }
- if st := lb.State(); st != ipn.NeedsLogin {
- t.Errorf("State = %v; want NeedsLogin", st)
- }
-}
-
// Issue 1573: don't generate a machine key if we don't want to be running.
func TestLazyMachineKeyGeneration(t *testing.T) {
defer func(old bool) { panicOnMachineKeyGeneration = old }(panicOnMachineKeyGeneration)