-
Notifications
You must be signed in to change notification settings - Fork 915
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
[BUG] buildPointSeriesData unit test fails due to hard-coded expected value that is not timezone friendly #4865
Comments
@evankielley Thank you for catching this test bug for us and you are absolutely right. I also reproduced and saw the unit test for As @evankielley suggested, to ensure consistency across different environments, the date-time strings used within the test should be explicitly defined in UTC. By using a format like I will raise a PR to fix it. |
Issue Resolved opensearch-project#4865 Signed-off-by: ananzh <[email protected]>
Issue Resolved opensearch-project#4865 Signed-off-by: ananzh <[email protected]>
Thanks @ananzh ! |
…4992) Issue Resolved #4865 Signed-off-by: ananzh <[email protected]> (cherry picked from commit 195417b) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
…4992) (#5031) Issue Resolved #4865 Signed-off-by: ananzh <[email protected]> (cherry picked from commit 195417b) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Describe the bug
The unit test buildPointSeriesData fails due to trying to match a hard-coded UTC datetime with a datetime generated in accordance with my machine's timezone. A simple fix would be to change the expected values to be
moment('2023-01-01')
andmoment('2023-01-01')
instead of'2023-01-01T00:00:00+00:00'
and'2023-01-02T00:00:00+00:00'
.To Reproduce
Steps to reproduce the behavior:
yarn test:jest src/plugins/discover/public/application/components/chart/utils/point_series.test.ts
Expected behavior
The unit test should pass.
OpenSearch Version
N/A
Dashboards Version
N/A
Plugins
N/A
Screenshots
Host/Environment (please complete the following information):
Additional context
yarn version: 1.22.19
node version: v18.16.0
The text was updated successfully, but these errors were encountered: