diff --git a/integration_cli_test.go b/integration_cli_test.go index 9ce31318..1b0f2a52 100644 --- a/integration_cli_test.go +++ b/integration_cli_test.go @@ -60,7 +60,7 @@ func (s *IntegrationCLITestSuite) SetupTest() { } headscaleOptions := &dockertest.RunOptions{ - Name: "headscale", + Name: "headscale-cli", Mounts: []string{ fmt.Sprintf("%s/integration_test/etc:/etc/headscale", currentPath), }, diff --git a/machine.go b/machine.go index ef4b86a3..4f112f67 100644 --- a/machine.go +++ b/machine.go @@ -772,7 +772,7 @@ func (h *Headscale) RegisterMachine(machine Machine, machine.IPAddresses = ips - if err := h.db.Save(machine).Error; err != nil { + if err := h.db.Save(&machine).Error; err != nil { return nil, fmt.Errorf("failed register(save) machine in the database: %w", err) }