mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-09 16:36:47 +00:00
Remove output fields from the logs test case
**What** - Fix the test to match the new logs command builder, without the output fields flag Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
This commit is contained in:
parent
e54da61283
commit
35e017b526
@ -62,7 +62,6 @@ func (r *requester) Query(ctx context.Context, req logs.Request) (<-chan logs.Me
|
|||||||
// --output=json \
|
// --output=json \
|
||||||
// --since=<timestamp> \
|
// --since=<timestamp> \
|
||||||
// <--follow> \
|
// <--follow> \
|
||||||
// --output-fields=SYSLOG_IDENTIFIER,MESSAGE,_PID,_SOURCE_REALTIME_TIMESTAMP
|
|
||||||
func buildCmd(ctx context.Context, req logs.Request) *exec.Cmd {
|
func buildCmd(ctx context.Context, req logs.Request) *exec.Cmd {
|
||||||
// // set the cursor position based on req, default to 5m
|
// // set the cursor position based on req, default to 5m
|
||||||
since := time.Now().Add(-5 * time.Minute)
|
since := time.Now().Add(-5 * time.Minute)
|
||||||
|
@ -57,7 +57,7 @@ func Test_buildCmd(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
expectedArgs := fmt.Sprintf(
|
expectedArgs := fmt.Sprintf(
|
||||||
"--utc --no-pager --output=json --output-fields=SYSLOG_IDENTIFIER,MESSAGE,_PID,_SOURCE_REALTIME_TIMESTAMP --identifier=spacetwo:loggyfunc --since=%s --follow --lines=5",
|
"--utc --no-pager --output=json --identifier=spacetwo:loggyfunc --since=%s --follow --lines=5",
|
||||||
now.UTC().Format("2006-01-02 15:04:05"),
|
now.UTC().Format("2006-01-02 15:04:05"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user