From d8c05fc1b24732b7966c73af3db20bbdea4f8ae9 Mon Sep 17 00:00:00 2001 From: Praneet Loke <1466314+praneetloke@users.noreply.github.com> Date: Wed, 8 Jun 2022 09:11:50 -0700 Subject: [PATCH] Update a Taildrop error message (#4818) ipn/ipnlocal: update error message on Taildrop send while not connected Signed-off-by: Praneet <1466314+praneetloke@users.noreply.github.com> --- ipn/ipnlocal/local.go | 2 +- ipn/ipnlocal/local_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go index dd3a1414f..70b2cb864 100644 --- a/ipn/ipnlocal/local.go +++ b/ipn/ipnlocal/local.go @@ -3108,7 +3108,7 @@ func (b *LocalBackend) FileTargets() ([]*apitype.FileTarget, error) { defer b.mu.Unlock() nm := b.netMap if b.state != ipn.Running || nm == nil { - return nil, errors.New("not connected") + return nil, errors.New("not connected to the tailnet") } if !b.capFileSharing { return nil, errors.New("file sharing not enabled by Tailscale admin") diff --git a/ipn/ipnlocal/local_test.go b/ipn/ipnlocal/local_test.go index 8a0df2867..07b8c7ac8 100644 --- a/ipn/ipnlocal/local_test.go +++ b/ipn/ipnlocal/local_test.go @@ -511,13 +511,13 @@ func TestLazyMachineKeyGeneration(t *testing.T) { func TestFileTargets(t *testing.T) { b := new(LocalBackend) _, err := b.FileTargets() - if got, want := fmt.Sprint(err), "not connected"; got != want { + if got, want := fmt.Sprint(err), "not connected to the tailnet"; got != want { t.Errorf("before connect: got %q; want %q", got, want) } b.netMap = new(netmap.NetworkMap) _, err = b.FileTargets() - if got, want := fmt.Sprint(err), "not connected"; got != want { + if got, want := fmt.Sprint(err), "not connected to the tailnet"; got != want { t.Errorf("non-running netmap: got %q; want %q", got, want) }