Skip to content

Commit

Permalink
Add option to run follow + label
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielsvinha committed May 9, 2018
1 parent 234939d commit 202feb3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
3 changes: 0 additions & 3 deletions pkg/kubectl/cmd/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,6 @@ func (o *LogsOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []str
o.LogsForObject = f.LogsForObject

if len(selector) != 0 {
if logOptions.Follow {
return cmdutil.UsageErrorf(cmd, "only one of follow (-f) or selector (-l) is allowed")
}
if logOptions.TailLines == nil && tail != -1 {
logOptions.TailLines = &selectorTail
}
Expand Down
5 changes: 0 additions & 5 deletions pkg/kubectl/cmd/logs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,6 @@ func TestLogComplete(t *testing.T) {
flags: map[string]string{"tail": "1"},
expected: "'logs (POD | TYPE/NAME) [CONTAINER_NAME]'.\nPOD or TYPE/NAME is a required argument for the logs command",
},
{
name: "follow and selecter conflict",
flags: map[string]string{"selector": "foo", "follow": "true"},
expected: "only one of follow (-f) or selector (-l) is allowed",
},
}
for _, test := range tests {
cmd := NewCmdLogs(f, genericclioptions.NewTestIOStreamsDiscard())
Expand Down

0 comments on commit 202feb3

Please sign in to comment.