mirror of
https://github.com/juanfont/headscale.git
synced 2025-11-02 22:17:44 +09:00
correctly update machine namespace
This commit is contained in:
@@ -399,6 +399,7 @@ func (s *Suite) TestSetMachineNamespace(c *check.C) {
|
||||
err = app.SetMachineNamespace(&machine, newNamespace.Name)
|
||||
c.Assert(err, check.IsNil)
|
||||
c.Assert(machine.NamespaceID, check.Equals, newNamespace.ID)
|
||||
c.Assert(machine.Namespace.Name, check.Equals, newNamespace.Name)
|
||||
|
||||
err = app.SetMachineNamespace(&machine, "non-existing-namespace")
|
||||
c.Assert(err, check.Equals, errNamespaceNotFound)
|
||||
@@ -406,4 +407,5 @@ func (s *Suite) TestSetMachineNamespace(c *check.C) {
|
||||
err = app.SetMachineNamespace(&machine, newNamespace.Name)
|
||||
c.Assert(err, check.IsNil)
|
||||
c.Assert(machine.NamespaceID, check.Equals, newNamespace.ID)
|
||||
c.Assert(machine.Namespace.Name, check.Equals, newNamespace.Name)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user