Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix quotes for configuration options #37

Merged
merged 20 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions examples/in_gdummy/go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
module github.com/fluent/fluent-bit-go/examples/gdummy

go 1.17
go 1.21

toolchain go1.21.0

require github.com/calyptia/plugin v0.1.6

require (
github.com/calyptia/cmetrics-go v0.1.7 // indirect
github.com/ugorji/go/codec v1.2.7 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
)

replace github.com/calyptia/plugin => ../..
1 change: 1 addition & 0 deletions examples/in_gdummy/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc
github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M=
github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0=
github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY=
github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=
github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
Expand Down
4 changes: 3 additions & 1 deletion examples/out_gstdout/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/fluent/fluent-bit-go/examples/gstdout

go 1.14
go 1.21

toolchain go1.21.0

require github.com/fluent/fluent-bit-go v0.0.0-20200420155746-e125cab17963

Expand Down
1,185 changes: 1,185 additions & 0 deletions examples/out_gstdout/go.sum

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion examples/out_multiinstance/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/fluent/fluent-bit-go/examples/multiinstance

go 1.14
go 1.21

toolchain go1.21.0

require github.com/fluent/fluent-bit-go v0.0.0-20200420155746-e125cab17963

Expand Down
1,185 changes: 1,185 additions & 0 deletions examples/out_multiinstance/go.sum

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ func testPlugin(t *testing.T, pool *dockertest.Pool) {
f, err := os.Create(filepath.Join(t.TempDir(), "output.txt"))
niedbalski marked this conversation as resolved.
Show resolved Hide resolved
assert.NoError(t, err)

defer func() {
err := os.RemoveAll(f.Name())
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not required since I was using t.TempDir() and that entire directory gets removed once the test finishes.

if err != nil {
return
}
}()

// Set permissions on the file to be world-writable
err = os.Chmod(f.Name(), 0777)
assert.NoError(t, err)

buildOpts := dc.BuildImageOptions{
Name: "fluent-bit-go.localhost",
ContextDir: ".",
Expand All @@ -59,7 +70,6 @@ func testPlugin(t *testing.T, pool *dockertest.Pool) {
fbit, err := pool.Client.CreateContainer(dc.CreateContainerOptions{
Config: &dc.Config{
Image: "fluent-bit-go.localhost",
User: "1000:1000",
},
HostConfig: &dc.HostConfig{
AutoRemove: true,
Expand Down
4 changes: 1 addition & 3 deletions testdata/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ RUN go mod verify

COPY . .

RUN rm -rf ./testdata/fluent-bit.conf
RUN rm -rf ./testdata/plugins.conf
RUN rm -rf ./testdata/output.txt
RUN rm -rf ./testdata/fluent-bit.conf ./testdata/plugins.conf ./testdata/output.txt

ADD https://github.com/fluent/cmetrics/releases/download/${CMETRICS_RELEASE}/cmetrics_${CMETRICS_VERSION}_${PACKAGEARCH}-headers.deb external/
ADD https://github.com/fluent/cmetrics/releases/download/${CMETRICS_RELEASE}/cmetrics_${CMETRICS_VERSION}_${PACKAGEARCH}.deb external/
Expand Down