mirror of
https://github.com/juanfont/headscale.git
synced 2025-11-02 05:57:46 +09:00
Do not assume IPv4 during address generation
This commit is contained in:
@@ -93,7 +93,7 @@ func (s *Suite) TestGetMultiIp(c *check.C) {
|
||||
|
||||
c.Assert(ips[0], check.Equals, netaddr.MustParseIP("10.27.0.1"))
|
||||
c.Assert(ips[9], check.Equals, netaddr.MustParseIP("10.27.0.10"))
|
||||
c.Assert(ips[300], check.Equals, netaddr.MustParseIP("10.27.1.47"))
|
||||
c.Assert(ips[300], check.Equals, netaddr.MustParseIP("10.27.1.45"))
|
||||
|
||||
// Check that we can read back the IPs
|
||||
machine1, err := app.GetMachineByID(1)
|
||||
@@ -112,7 +112,7 @@ func (s *Suite) TestGetMultiIp(c *check.C) {
|
||||
netaddr.MustParseIP("10.27.0.50").String(),
|
||||
)
|
||||
|
||||
expectedNextIP := netaddr.MustParseIP("10.27.1.97")
|
||||
expectedNextIP := netaddr.MustParseIP("10.27.1.95")
|
||||
nextIP, err := app.getAvailableIP()
|
||||
c.Assert(err, check.IsNil)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user