Skip to content

Commit

Permalink
Update fluent-bit to 2.2.1 release. (#1559)
Browse files Browse the repository at this point in the history
Co-authored-by: avilevy18 <[email protected]>
  • Loading branch information
franciscovalentecastro and avilevy18 authored Jan 5, 2024
1 parent 0bbd556 commit 34972f6
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
39 changes: 39 additions & 0 deletions integration_test/ops_agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4698,6 +4698,45 @@ func TestNoNvmlOtelReceiverWithoutGpu(t *testing.T) {
})
}

func TestPartialSuccess(t *testing.T) {
t.Parallel()
gce.RunForEachPlatform(t, func(t *testing.T, platform string) {
ctx, logger, vm := setupMainLogAndVM(t, platform)
logPath := logPathForPlatform(vm.Platform)
config := fmt.Sprintf(`logging:
receivers:
files_1:
type: files
include_paths: [%s]
service:
pipelines:
p1:
receivers: [files_1]`, logPath)
testFile, err := os.Open(path.Join("testdata", "partial_success", "test.log"))
if err != nil {
t.Fatal(err)
}
defer testFile.Close()
if err = gce.UploadContent(ctx, logger, vm, testFile, logPath); err != nil {
t.Fatal(err)
}
if err = agents.SetupOpsAgent(ctx, logger, vm, config); err != nil {
t.Fatal(err)
}

// partialSuccess behaviour is documented at: https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write
if err := gce.WaitForLog(ctx, logger, vm, "files_1", time.Hour, `jsonPayload.message="google"`); err != nil {
t.Error(err)
}
if err = gce.WaitForLog(ctx, logger, vm, "files_1", time.Hour, `jsonPayload.message="foo"`); err != nil {
t.Error(err)
}
if err = gce.WaitForLog(ctx, logger, vm, "files_1", time.Hour, `jsonPayload.message="goo"`); err != nil {
t.Error(err)
}
})
}

func TestRestartVM(t *testing.T) {
t.Parallel()
gce.RunForEachPlatform(t, func(t *testing.T, platform string) {
Expand Down
5 changes: 5 additions & 0 deletions integration_test/testdata/partial_success/test.log

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion submodules/fluent-bit
Submodule fluent-bit updated 3182 files

0 comments on commit 34972f6

Please sign in to comment.