mirror of
https://github.com/jsiebens/ionscale.git
synced 2026-03-31 15:07:49 +01:00
fix: add missing tags
This commit is contained in:
@@ -225,6 +225,7 @@ func ToNode(capVer tailcfg.CapabilityVersion, m *domain.Machine, tailnet *domain
|
||||
|
||||
if m.HasTags() {
|
||||
n.User = tailcfg.UserID(taggedDevicesUser.ID)
|
||||
n.Tags = m.Tags
|
||||
user = tailcfg.UserProfile{
|
||||
ID: tailcfg.UserID(taggedDevicesUser.ID),
|
||||
LoginName: "tagged-devices",
|
||||
|
||||
@@ -80,3 +80,16 @@ func TestNodeWithSameHostname(t *testing.T) {
|
||||
}, machines)
|
||||
})
|
||||
}
|
||||
|
||||
func TestNodeShouldSeeAssignedTags(t *testing.T) {
|
||||
sc.Run(t, func(s *sc.Scenario) {
|
||||
tailnet := s.CreateTailnet()
|
||||
key := s.CreateAuthKey(tailnet.Id, true, "tag:server")
|
||||
|
||||
nodeA := s.NewTailscaleNode()
|
||||
|
||||
require.NoError(t, nodeA.Up(key, tsn.WithAdvertiseTags("tag:test")))
|
||||
require.NoError(t, nodeA.WaitFor(tsn.HasTag("tag:server")))
|
||||
require.NoError(t, nodeA.WaitFor(tsn.HasTag("tag:test")))
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user