-
Notifications
You must be signed in to change notification settings - Fork 380
DVPL-12497: Fix CSC apps' tests #633
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
Conversation
5fc4ec1
to
d514410
Compare
For reasons yet unknown to me, we check for |
d514410
to
2b63865
Compare
To be honest, I don't understand what is going on here. Why are we testing for errors in Splunk? I thought what actually needs fixing is the query. Otherwise, the test that was already there looks fine to me - it tests the eventing app's behaviour, not Splunk's. |
I don’t think the goal is to test the eventing app itself (it’s just a simple example) but rather the SDK components used to build it. My thinking was that it’s good to cover not just the happy path, but also cases where something is done incorrectly, and ensure the SDK handles that properly. That said, you’re right — maybe we should focus on testing cases where an app is created incorrectly, rather than cases where it’s just used incorrectly. |
12d213b
to
14d70f5
Compare
14d70f5
to
8ee7e8a
Compare
8ee7e8a
to
ccf4e8e
Compare
Fixed a flaky test
tests/searchcommands/test_csc_apps.py::TestCSC::test_eventing_app
caused by:_internal
index, which is not guaranteed to contain the required data.status
field causedeventingcsc status=200
to raiseKeyError
, which wasn’t caught by the test assertions.The Fix
_create_test_data_search
that creates synthetic events for theeventingcsc
command