Skip to content

Commit

Permalink
monitor command takes no args
Browse files Browse the repository at this point in the history
rm extra new line
  • Loading branch information
drewbailey committed Nov 1, 2019
1 parent cd37eb1 commit 43ea91b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion api/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ type MonitorFrame struct {
// Monitor returns a channel which will receive streaming logs from the agent
// Providing a non-nil stopCh can be used to close the connection and stop log streaming
func (a *Agent) Monitor(stopCh <-chan struct{}, q *QueryOptions) (<-chan *StreamFrame, <-chan error) {

errCh := make(chan error, 1)
r, err := a.client.newRequest("GET", "/v1/agent/monitor")
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion command/agent/monitor/monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ func TestMonitor_DroppedMessages(t *testing.T) {
}

received := ""

passed := make(chan struct{})
go func() {
for {
Expand Down
7 changes: 7 additions & 0 deletions command/agent_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ func (c *MonitorCommand) Run(args []string) int {
return 1
}

args = flags.Args()
if l := len(args); l != 0 {
c.Ui.Error("This command takes no arguments")
c.Ui.Error(commandErrorText(c))
return 1
}

client, err := c.Meta.Client()
if err != nil {
c.Ui.Error(fmt.Sprintf("Error initializing client: %s", err))
Expand Down

0 comments on commit 43ea91b

Please sign in to comment.