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 merge multi field #168

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

TotalKnob
Copy link

Fix for merging an array of fields into the destination using the merge mutation.

I have included a test which produces the following failure prior to the fix:

LogStash::Filters::Mutate merge multiple fields into string field "{\"foo\":\"bar\",\"spam\":\"ham\",\"list\":\"baz\"}" processes events as specified
     Failure/Error: expect(subject.get("list")).to eq ["baz", "bar", "ham"]
     
       expected: ["baz", "bar", "ham"]
            got: ["baz", "ham"]
     
       (compared using ==)
     # ./spec/filters/mutate_spec.rb:1092:in `block in <main>'

Test passes after the fix.

Fixes #167

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merging Multiple Fields Fails
2 participants