From 76b2c50dbcf11c95ad1df81ad33207d711dca677 Mon Sep 17 00:00:00 2001 From: Chelsea Holland Komlo Date: Fri, 6 Oct 2017 21:54:55 -0400 Subject: [PATCH] fix up build warnings --- client/client.go | 2 +- command/agent/alloc_endpoint_test.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/client/client.go b/client/client.go index 7e4fa1ec7..27f1f2c4e 100644 --- a/client/client.go +++ b/client/client.go @@ -527,7 +527,7 @@ func (c *Client) LatestHostStats() *stats.HostStats { } // ValidateMigrateToken verifies that a token is for a specific client and -// allocation, and has been created by a trusted party that has privilaged +// allocation, and has been created by a trusted party that has privileged // knowledge of the client's secret identifier func (c *Client) ValidateMigrateToken(allocID, migrateToken string) bool { if !c.config.ACLEnabled { diff --git a/command/agent/alloc_endpoint_test.go b/command/agent/alloc_endpoint_test.go index 9076d0d24..2eeef7e22 100644 --- a/command/agent/alloc_endpoint_test.go +++ b/command/agent/alloc_endpoint_test.go @@ -320,6 +320,11 @@ func TestHTTP_AllocSnapshot(t *testing.T) { func createMigrateTokenForClientAndAlloc(allocID, clientSecret string) (string, error) { h, err := blake2b.New512([]byte(clientSecret)) + + if err != nil { + return "", err + } + h.Write([]byte(allocID)) validMigrateToken, err := string(h.Sum(nil)), nil return validMigrateToken, err