-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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/improve watcher test scripts: YAML support, metadata-git-commit, better error handling, --cacert, multiple time fields #239
Fix/improve watcher test scripts: YAML support, metadata-git-commit, better error handling, --cacert, multiple time fields #239
Conversation
Needed for: elastic/elasticsearch#30112 (comment) > I already have a workaround in place for this which consists of automatically deploying as many watches as I need to send different mails. Those watches are derived from my watch definition. For this, I extended [run_test.py](https://github.com/elastic/examples/blob/master/Alerting/Sample%20Watches/run_test.py) to inject Python code after the watch definition is read. Not ideal, but it is maintainable.
Needed for: elastic/elasticsearch#30112 (comment) > I already have a workaround in place for this which consists of automatically deploying as many watches as I need to send different mails. Those watches are derived from my watch definition. For this, I extended [run_test.py](https://github.com/elastic/examples/blob/master/Alerting/Sample%20Watches/run_test.py) to inject Python code after the watch definition is read. Not ideal, but it is maintainable.
Needed for: elastic/elasticsearch#30112 (comment) > I already have a workaround in place for this which consists of automatically deploying as many watches as I need to send different mails. Those watches are derived from my watch definition. For this, I extended [run_test.py](https://github.com/elastic/examples/blob/master/Alerting/Sample%20Watches/run_test.py) to inject Python code after the watch definition is read. Not ideal, but it is maintainable.
Useful when you have two time fields that in reality should be very close so in testing it is enough to set them to the same value.
8699e59
to
b48043c
Compare
As far as I can tell, the version of |
@ypid-geberit : |
Done that. I went with merging the latest master into my branch which was way easier because here in this PR, I did some radical changes of Note that we could drop Edit: The force push you see below was only me cleaning up the git history by splitting up commits. One commit should only do one thing. I did not change any code other than fixing an issue in efad59e so the review by DanRoscigno should still be valid. |
5ad5e4e
to
36c5cbe
Compare
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.
run_all_tests.sh LGTM
@gingerwizard can you have a look at the diffs to run_all_tests.py
@legalastic can you comment on the copyright lines of run_all_tests.py:
SPDX-FileCopyrightText: 2017 Dale McDiarmid dalem@elastic.co
SPDX-FileCopyrightText: 2017-2020 Robin Schneider robin.schneider@geberit.com
SPDX-FileCopyrightText: 2020 Dan Roscigno dan@roscigno.com
SPDX-License-Identifier: Apache-2.0
run_test.sh LGTM
36c5cbe
to
97bfa9b
Compare
Ping @DanRoscigno, @legalastic @gingerwizard I still think this is a useful enhancement. What do you think? |
Example: ```yaml time_fields: - '@timestamp' - 'event.created' ```
@DanRoscigno, @legalastic @gingerwizard: Any chance of getting this merged? |
Done, thanks @ypid-geberit |
So long and then so quickly merged. You are welcome, thanks for merging :) |
Using YAML comes in handy for bigger watches 😉