From 2dbcad3f4504e35c4347553bfa29ebeb888e4e19 Mon Sep 17 00:00:00 2001 From: Drew Bailey <2614075+drewbailey@users.noreply.github.com> Date: Wed, 29 Jan 2020 13:55:14 -0500 Subject: [PATCH] fix tests, update changelog --- CHANGELOG.md | 3 ++- api/agent_test.go | 2 +- e2e/connect/input/multi-service.nomad | 4 ++-- nomad/client_agent_endpoint_test.go | 7 +++++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5e61f029..2ef2cad71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,9 +18,10 @@ IMPROVEMENTS: BUG FIXES: * agent: Fixed race condition in logging when using `nomad monitor` command [[GH-6872](https://github.com/hashicorp/nomad/issues/6872)] + * agent: Fixed a bug where `nomad monitor -server-id` only work for a server's name instead of uuid or name. [[GH-7015](https://github.com/hashicorp/nomad/issues/7015)] * cli: Fixed a bug where `nomad monitor -node-id` would cause a cli panic when no nodes where found. [[GH-6828](https://github.com/hashicorp/nomad/issues/6828)] * config: Fixed a bug where agent startup would fail if the `consul.timeout` configuration was set. [[GH-6907](https://github.com/hashicorp/nomad/issues/6907)] - * consul: Fixed a bug where script-based health checks would fail if the service configuration included interpolation. [[GH-6916](https://github.com/hashicorp/nomad/issues/6916)] + * consul: Fixed a bug where script-based health checks would fail if the service configuration included interpolation. [[GH-6916](https://github.com/hashicorp/nomad/issues/6916)] * consul/connect: Fixed a bug where Connect-enabled jobs failed to validate when service names used interpolation. [[GH-6855](https://github.com/hashicorp/nomad/issues/6855)] * scheduler: Fixed a bug that caused evicted allocs on a lost node to be stuck in running. [[GH-6902](https://github.com/hashicorp/nomad/issues/6902)] * scheduler: Fixed a bug where `nomad job plan/apply` returned errors instead of a partial placement warning for ineligible nodes. [[GH-6968](https://github.com/hashicorp/nomad/issues/6968)] diff --git a/api/agent_test.go b/api/agent_test.go index 078da8fa8..8fff6cfb0 100644 --- a/api/agent_test.go +++ b/api/agent_test.go @@ -407,7 +407,7 @@ func TestAgentCPUProfile(t *testing.T) { } resp, err := agent.CPUProfile(opts, q) require.Error(t, err) - require.Contains(t, err.Error(), "500 (unknown nomad server unknown.global)") + require.Contains(t, err.Error(), "500 (unknown Nomad server unknown.global)") require.Nil(t, resp) } diff --git a/e2e/connect/input/multi-service.nomad b/e2e/connect/input/multi-service.nomad index 1699dbf85..2d57c13b4 100644 --- a/e2e/connect/input/multi-service.nomad +++ b/e2e/connect/input/multi-service.nomad @@ -25,7 +25,7 @@ job "multi-service" { config { image = "hashicorp/http-echo" - args = ["-listen=:9001", "-text=echo1"] + args = ["-listen=:9001", "-text=echo1"] } } @@ -43,7 +43,7 @@ job "multi-service" { config { image = "hashicorp/http-echo" - args = ["-listen=:9002", "-text=echo2"] + args = ["-listen=:9002", "-text=echo2"] } } } diff --git a/nomad/client_agent_endpoint_test.go b/nomad/client_agent_endpoint_test.go index 7e8b13494..c87cf51b2 100644 --- a/nomad/client_agent_endpoint_test.go +++ b/nomad/client_agent_endpoint_test.go @@ -330,6 +330,9 @@ func TestMonitor_MonitorServer(t *testing.T) { // No node ID to monitor the remote server req := cstructs.MonitorRequest{ LogLevel: "debug", + QueryOptions: structs.QueryOptions{ + Region: "global", + }, } handler, err := s.StreamingRpcHandler("Agent.Monitor") @@ -589,7 +592,7 @@ func TestAgentProfile_RemoteRegionMisMatch(t *testing.T) { reply := structs.AgentPprofResponse{} err := s1.RPC("Agent.Profile", &req, &reply) - require.Contains(err.Error(), "does not exist in requested region") + require.Contains(err.Error(), "unknown Nomad server") require.Nil(reply.Payload) } @@ -704,7 +707,7 @@ func TestAgentProfile_Server(t *testing.T) { serverID: uuid.Generate(), origin: nonLeader, reqType: pprof.CmdReq, - expectedErr: "unknown nomad server", + expectedErr: "unknown Nomad server", expectedAgentID: "", }, }