Skip to content

Commit

Permalink
#72 Fix failing tests and cover append extra args case
Browse files Browse the repository at this point in the history
  • Loading branch information
zshamrock committed Aug 3, 2018
1 parent 3f7954e commit f330434
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion command/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ func TestGetCommandExtraArgs(t *testing.T) {
followFlags := []string{"", "-f", "--follow"}
commandsData := []map[string]string{
{"name": "logs-extra1", "extra": "rest.log", "command": "tail -f -n 10 logs/rest.log"},
{"name": "logs-extra2", "extra": "5", "command": "tail -f -n 5 logs/app.log 5"},
{"name": "logs-extra2", "extra": "5", "command": "tail -f -n 5 logs/app.log"},
{"name": "logs-extra3", "extra": "append test", "command": "tail -f logs/app.log append test"},
}
for _, followFlag := range followFlags {
for _, commandData := range commandsData {
Expand Down
3 changes: 3 additions & 0 deletions test/config/commands
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ command=tail -f -n 10 logs/%s

[logs-extra2]
command=tail -f -n %s logs/app.log

[logs-extra3]
command=tail -f logs/app.log

0 comments on commit f330434

Please sign in to comment.