Rename Machine to Node (#1553)
This commit is contained in:
parent
096ac31bb3
commit
0030af3fa4
57 changed files with 5222 additions and 5238 deletions
|
@ -223,18 +223,18 @@ func TestEphemeral(t *testing.T) {
|
|||
t.Logf("all clients logged out")
|
||||
|
||||
for userName := range spec {
|
||||
machines, err := headscale.ListMachinesInUser(userName)
|
||||
nodes, err := headscale.ListNodesInUser(userName)
|
||||
if err != nil {
|
||||
log.Error().
|
||||
Err(err).
|
||||
Str("user", userName).
|
||||
Msg("Error listing machines in user")
|
||||
Msg("Error listing nodes in user")
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
if len(machines) != 0 {
|
||||
t.Fatalf("expected no machines, got %d in user %s", len(machines), userName)
|
||||
if len(nodes) != 0 {
|
||||
t.Fatalf("expected no nodes, got %d in user %s", len(nodes), userName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -513,8 +513,8 @@ func TestExpireNode(t *testing.T) {
|
|||
})
|
||||
assertNoErr(t, err)
|
||||
|
||||
var machine v1.Machine
|
||||
err = json.Unmarshal([]byte(result), &machine)
|
||||
var node v1.Node
|
||||
err = json.Unmarshal([]byte(result), &node)
|
||||
assertNoErr(t, err)
|
||||
|
||||
time.Sleep(30 * time.Second)
|
||||
|
@ -530,10 +530,10 @@ func TestExpireNode(t *testing.T) {
|
|||
|
||||
peerPublicKey := strings.TrimPrefix(peerStatus.PublicKey.String(), "nodekey:")
|
||||
|
||||
assert.NotEqual(t, machine.NodeKey, peerPublicKey)
|
||||
assert.NotEqual(t, node.NodeKey, peerPublicKey)
|
||||
}
|
||||
|
||||
if client.Hostname() != machine.Name {
|
||||
if client.Hostname() != node.Name {
|
||||
// Assert that we have the original count - self - expired node
|
||||
assert.Len(t, status.Peers(), len(MustTestVersions)-2)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue