notify nodes after owner change (#2543)
* proto: user id as identifier for move node Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com> * gen: regenr Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com> * grpc: move, use userid, one tx, send update Updates #2467 Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com> * integration: update move cli tests Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com> --------- Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
parent
cfe9bbf829
commit
6b6509eeeb
6 changed files with 37 additions and 24 deletions
|
@ -1580,6 +1580,9 @@ func TestNodeMoveCommand(t *testing.T) {
|
|||
// Randomly generated node key
|
||||
regID := types.MustRegistrationID()
|
||||
|
||||
userMap, err := headscale.MapUsers()
|
||||
assertNoErr(t, err)
|
||||
|
||||
_, err = headscale.Execute(
|
||||
[]string{
|
||||
"headscale",
|
||||
|
@ -1628,9 +1631,9 @@ func TestNodeMoveCommand(t *testing.T) {
|
|||
"nodes",
|
||||
"move",
|
||||
"--identifier",
|
||||
nodeID,
|
||||
strconv.FormatUint(node.GetId(), 10),
|
||||
"--user",
|
||||
"new-user",
|
||||
strconv.FormatUint(userMap["new-user"].GetId(), 10),
|
||||
"--output",
|
||||
"json",
|
||||
},
|
||||
|
@ -1668,7 +1671,7 @@ func TestNodeMoveCommand(t *testing.T) {
|
|||
"--identifier",
|
||||
nodeID,
|
||||
"--user",
|
||||
"non-existing-user",
|
||||
"999",
|
||||
"--output",
|
||||
"json",
|
||||
},
|
||||
|
@ -1689,7 +1692,7 @@ func TestNodeMoveCommand(t *testing.T) {
|
|||
"--identifier",
|
||||
nodeID,
|
||||
"--user",
|
||||
"old-user",
|
||||
strconv.FormatUint(userMap["old-user"].GetId(), 10),
|
||||
"--output",
|
||||
"json",
|
||||
},
|
||||
|
@ -1708,7 +1711,7 @@ func TestNodeMoveCommand(t *testing.T) {
|
|||
"--identifier",
|
||||
nodeID,
|
||||
"--user",
|
||||
"old-user",
|
||||
strconv.FormatUint(userMap["old-user"].GetId(), 10),
|
||||
"--output",
|
||||
"json",
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue