moving endpoints over to frames

This commit is contained in:
Drew Bailey
2019-11-01 10:33:28 -04:00
parent f8eaf1f5af
commit 9a96c10d4c
6 changed files with 97 additions and 27 deletions

View File

@@ -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
}

View File

@@ -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}}