Allow to remove forced tags of a node

Set as empty StringList
This commit is contained in:
Juan Font committed 2024-04-18 09:55:55 +02:00
1 parent 580f96ce83
commit c906aaf927
2 files changed
+12

No files matched your search

+7
View File
@@ -386,6 +386,13 @@ func (s *Suite) TestSetTags(c *check.C) {
check.DeepEquals,
types.StringList([]string{"tag:bar", "tag:test", "tag:unknown"}),
)
// test removing tags
err = db.SetTags(node.ID, []string{})
c.Assert(err, check.IsNil)
node, err = db.getNode("test", "testnode")
c.Assert(err, check.IsNil)
c.Assert(node.ForcedTags, check.DeepEquals, types.StringList([]string{}))
}
func TestHeadscale_generateGivenName(t *testing.T) {