From 5ecfbbaf5d423921b6d9a2935cb337734fa06d85 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Tue, 31 May 2022 10:05:00 +0200 Subject: [PATCH] Fix pointer in machine save call --- integration_cli_test.go | 2 +- machine.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) }