mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
moving endpoints over to frames
This commit is contained in:
@@ -298,15 +298,13 @@ func TestHTTP_AgentMonitor(t *testing.T) {
|
||||
tried := 0
|
||||
testutil.WaitForResult(func() (bool, error) {
|
||||
if tried < maxLogAttempts {
|
||||
s.Server.logger.Debug("log that should not be sent")
|
||||
s.Server.logger.Warn("log that should be sent")
|
||||
tried++
|
||||
}
|
||||
|
||||
got := resp.Body.String()
|
||||
want := "[WARN] http: log that should be sent"
|
||||
want := `{"Data":"`
|
||||
if strings.Contains(got, want) {
|
||||
require.NotContains(t, resp.Body.String(), "[DEBUG]")
|
||||
return true, nil
|
||||
}
|
||||
|
||||
@@ -344,9 +342,8 @@ func TestHTTP_AgentMonitor(t *testing.T) {
|
||||
}
|
||||
|
||||
out += string(output)
|
||||
want := "[WARN] http: log that should be sent"
|
||||
want := `{"Data":"`
|
||||
if strings.Contains(out, want) {
|
||||
require.NotContains(t, resp.Body.String(), "[DEBUG]")
|
||||
return true, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@ func TestMonitorCommand_Implements(t *testing.T) {
|
||||
|
||||
func TestMonitorCommand_Fails(t *testing.T) {
|
||||
t.Parallel()
|
||||
srv, _, _ := testServer(t, false, nil)
|
||||
defer srv.Shutdown()
|
||||
|
||||
ui := new(cli.MockUi)
|
||||
cmd := &MonitorCommand{Meta: Meta{Ui: ui}}
|
||||
|
||||
Reference in New Issue
Block a user