-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat: Add real tests for splunk logger using vector #9526
Conversation
Signed-off-by: revolyssup <ashishjaitiwari15112000@gmail.com>
Signed-off-by: revolyssup <ashishjaitiwari15112000@gmail.com>
Signed-off-by: revolyssup <ashishjaitiwari15112000@gmail.com>
Signed-off-by: revolyssup <ashishjaitiwari15112000@gmail.com>
@Sn0rt please help to review |
t/plugin/splunk-hec-logging.t
Outdated
["hello world\n", "hello world\n", "hello world\n"] | ||
--- no_error_log | ||
[error] | ||
qr/.*test batched data.*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new line
@@ -187,18 +187,6 @@ services: | |||
networks: | |||
opa_net: | |||
|
|||
# Splunk HEC Logging Service | |||
splunk: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why remove this component?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
please resolve conflicts |
Signed-off-by: revolyssup <ashishjaitiwari15112000@gmail.com>
Signed-off-by: revolyssup <ashishjaitiwari15112000@gmail.com>
@@ -406,19 +400,23 @@ the mock backend is hit | |||
if code >= 300 then | |||
ngx.status = code | |||
end | |||
ngx.say(body) | |||
local code, _, body2 = t("/hello", "GET") |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need a blank
if code >= 300 then | ||
ngx.status = code | ||
ngx.say(body) | ||
return | ||
end | ||
|
||
local code, _, body2 = t("/hello", "GET") |
There was a problem hiding this comment.
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, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need a blank
There was a problem hiding this comment.
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
Signed-off-by: revolyssup <ashishjaitiwari15112000@gmail.com>
Signed-off-by: revolyssup <ashishjaitiwari15112000@gmail.com>
Could you merge the master? The ci always failed because the go packages faile to download. |
@monkeyDluffy6017 I merged master. Please review |
Description
Fixes #9489
This PR replaces mock splunk-hec-logger tests with real end to end test using vector as log server.
Checklist