ipn/ipnlocal, tka: Implement TKA synchronization with the control plane

Signed-off-by: Tom DNetto <tom@tailscale.com>
This commit is contained in:
Tom DNetto
2022-09-27 12:30:04 -07:00
committed by Tom
parent ab591906c8
commit 58ffe928af
4 changed files with 442 additions and 7 deletions

View File

@@ -58,6 +58,18 @@ func TestTailchonk_ChildAUMs(t *testing.T) {
}
}
func TestTailchonk_AUMMissing(t *testing.T) {
for _, chonk := range []Chonk{&Mem{}, &FS{base: t.TempDir()}} {
t.Run(fmt.Sprintf("%T", chonk), func(t *testing.T) {
var notExists AUMHash
notExists[:][0] = 42
if _, err := chonk.AUM(notExists); err != os.ErrNotExist {
t.Errorf("chonk.AUM(notExists).err = %v, want %v", err, os.ErrNotExist)
}
})
}
}
func TestTailchonkMem_Orphans(t *testing.T) {
chonk := Mem{}