Skip to content

feat: Add real tests for splunk logger using vector#9526

Merged
juststillthinking merged 10 commits into
apache:masterfrom
Revolyssup:addSplunkTests
Jun 2, 2023
Merged

feat: Add real tests for splunk logger using vector#9526
juststillthinking merged 10 commits into
apache:masterfrom
Revolyssup:addSplunkTests

Conversation

@Revolyssup

@Revolyssup Revolyssup commented May 23, 2023

Copy link
Copy Markdown
Contributor

Description

Fixes #9489
This PR replaces mock splunk-hec-logger tests with real end to end test using vector as log server.

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@juststillthinking

Copy link
Copy Markdown
Contributor

@Sn0rt please help to review

Comment thread t/plugin/splunk-hec-logging.t Outdated
["hello world\n", "hello world\n", "hello world\n"]
--- no_error_log
[error]
qr/.*test batched data.*/ No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

new line

opa_net:

# Splunk HEC Logging Service
splunk:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why remove this component?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Because we don't need a separate splunk server now. Vector does the job

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ok

@juststillthinking

Copy link
Copy Markdown
Contributor

please resolve conflicts

Signed-off-by: revolyssup <[email protected]>
Signed-off-by: revolyssup <[email protected]>
Signed-off-by: revolyssup <[email protected]>
ngx.status = code
end
ngx.say(body)
local code, _, body2 = t("/hello", "GET")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

need a blank

ngx.status = code
ngx.say(body)
return
end

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

need a blank

return
end

local code, _, body2 = t("/hello", "GET")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

need a blank

ngx.say(body)
return
end
local code, body = t('/apisix/admin/routes/1', ngx.HTTP_PUT, {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

need a blank

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added newline at all suggested place @monkeyDluffy6017

@juststillthinking juststillthinking added the wait for update wait for the author's response in this issue/PR label May 29, 2023
Signed-off-by: revolyssup <[email protected]>
Signed-off-by: revolyssup <[email protected]>
@juststillthinking

Copy link
Copy Markdown
Contributor

Could you merge the master? The ci always failed because the go packages faile to download.

@Revolyssup

Copy link
Copy Markdown
Contributor Author

Could you merge the master? The ci always failed because the go packages faile to download.

@monkeyDluffy6017 I merged master. Please review

@juststillthinking juststillthinking added approved and removed wait for update wait for the author's response in this issue/PR labels Jun 2, 2023
@juststillthinking
juststillthinking merged commit 6ba4f73 into apache:master Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: As a user, I want the test of HEC logger with some real cases, so that

4 participants