mirror of
https://github.com/juanfont/headscale.git
synced 2026-11-19 11:57:07 +09:00
integration: expect not found from nodes update-client
Run every tested client version. Updates #3629
This commit is contained in:
1 parent
f9992637a6
commit
6245fbe30b
1 file changed
+6
-7
@@ -1263,13 +1263,13 @@ func TestNodeBackfillIPsCommand(t *testing.T) {
|
||||
}
|
||||
|
||||
// TestNodeUpdateClientCommand verifies that `headscale nodes update-client`
|
||||
// reaches a real tailscaled over c2n and reports its answer. The test
|
||||
// clients have auto-updates off, so each one must refuse with "not enabled".
|
||||
// answers every client version as Tailscale does. The test clients have
|
||||
// auto-updates off, so Hostinfo.AllowsUpdate is false and each is "not found".
|
||||
func TestNodeUpdateClientCommand(t *testing.T) {
|
||||
IntegrationSkip(t)
|
||||
|
||||
spec := ScenarioSpec{
|
||||
NodesPerUser: 1,
|
||||
NodesPerUser: len(MustTestVersions),
|
||||
Users: []string{"node-update-user"},
|
||||
}
|
||||
|
||||
@@ -1310,9 +1310,8 @@ func TestNodeUpdateClientCommand(t *testing.T) {
|
||||
"--identifier",
|
||||
node.Id,
|
||||
})
|
||||
require.Error(t, err, "node %s has auto-updates off and must refuse", node.Name)
|
||||
assert.Contains(t, err.Error(), "node did not start the client update: not enabled",
|
||||
"node %s should answer the c2n request with its refusal", node.Name)
|
||||
require.Error(t, err, "node %s has auto-updates off and must be refused", node.Name)
|
||||
assert.Contains(t, err.Error(), "api error (404): not found", "node %s", node.Name)
|
||||
}
|
||||
|
||||
// Unknown nodes are rejected before anything is sent.
|
||||
@@ -1324,5 +1323,5 @@ func TestNodeUpdateClientCommand(t *testing.T) {
|
||||
"9999",
|
||||
})
|
||||
require.Error(t, err)
|
||||
assert.Contains(t, err.Error(), "device not found")
|
||||
assert.Contains(t, err.Error(), "api error (404): no manageable device matching this ID found")
|
||||
}
|
||||
Reference in new issue
Block a user