Skip to content
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

Update unit tests #233

Merged
merged 9 commits into from
Mar 26, 2021
Merged

Conversation

kavilla
Copy link
Member

@kavilla kavilla commented Mar 24, 2021

Description

Update unit tests to succeed. Updating the tests where it needs to be in expectations, or potentially some missed updates, or even ignoring some directories because they are no longer relevant. Also, included updating the compressed files that get uncompressed during test run and verified.

Some snapshots had to be updated again as well.

Issues Resolved

#207

Check List

  • New functionality includes testing.
    • All tests pass (unit tests at least)
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

@odfe-release-bot
Copy link

✅   DCO Check Passed 2a5aebe

Copy link
Member

@ananzh ananzh left a comment

Choose a reason for hiding this comment

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

looks good. only a few check.

kavilla added 3 commits March 24, 2021 18:50
~25 failures still. I need to update the project to just ignore the
maps directory completely for tests instead of just ignoring one test.

Signed-off-by: Kawika Avilla <[email protected]>
Signed-off-by: Kawika Avilla <[email protected]>
8 failures still. Committing here because the remaining but require
an agreement of next steps.

Signed-off-by: Kawika Avilla <[email protected]>
@kavilla kavilla force-pushed the update-unit-tests branch from 2a5aebe to 7d42286 Compare March 24, 2021 21:43
@odfe-release-bot
Copy link

✅   DCO Check Passed 7d42286

@odfe-release-bot
Copy link

✅   DCO Check Passed 499711f

@odfe-release-bot
Copy link

✅   DCO Check Passed 20d3952

Files were uncompressed, renamed, and then compressed again for unit
tests.

Signed-off-by: Kawika Avilla <[email protected]>
@kavilla kavilla force-pushed the update-unit-tests branch from 20d3952 to 4f390a6 Compare March 24, 2021 22:38
@odfe-release-bot
Copy link

✅   DCO Check Passed 4f390a6

ananzh
ananzh previously approved these changes Mar 25, 2021
@odfe-release-bot
Copy link

✅   DCO Check Passed c314dbd

Updated references to OpenSearch and OpenSearch Dashboards for
the zipped files with the cli_plugin for the tests to pass.

Signed-off-by: Kawika Avilla <[email protected]>
@odfe-release-bot
Copy link

✅   DCO Check Passed 8c44e54

This test checks if image exists but this image was removed in the
renaming process at this commit: 3ecadd0.

Signed-off-by: Kawika Avilla <[email protected]>
@odfe-release-bot
Copy link

✅   DCO Check Passed e3a9612

Updating a test that discovers plugins to have the correct amount.
The original tests removed the creation of the mock related to x-pack.

Update the test to get the correct values while running tests.

Signed-off-by: Kawika Avilla <[email protected]>
@odfe-release-bot
Copy link

✅   DCO Check Passed b93ef34

@kavilla kavilla added this to the Beta release milestone Mar 25, 2021
@kavilla kavilla marked this pull request as ready for review March 25, 2021 20:54
@kavilla
Copy link
Member Author

kavilla commented Mar 25, 2021

Results:

Test Suites: 24 skipped, 1415 passed, 1415 of 1439 total
Tests:       257 skipped, 9 todo, 10359 passed, 10625 total
Snapshots:   2369 passed, 2369 total
Time:        187.572 s
Ran all test suites.
Done in 190.65s.

@kavilla kavilla linked an issue Mar 25, 2021 that may be closed by this pull request
3 tasks
boktorbb
boktorbb previously approved these changes Mar 25, 2021
Copy link
Contributor

@boktorbb boktorbb left a comment

Choose a reason for hiding this comment

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

Looks good. Just one question

src/core/public/doc_links/doc_links_service.test.ts Outdated Show resolved Hide resolved
PR comment to include RENAMEME for easy grepping and update a ref
to opensearch.com to opensearch.co so that it is easier to grep while
renaming. Then had to regenerate the snapshots.

Signed-off-by: Kawika Avilla <[email protected]>
@odfe-release-bot
Copy link

✅   DCO Check Passed 4fcc7bb

Copy link
Contributor

@boktorbb boktorbb left a comment

Choose a reason for hiding this comment

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

looks good

Copy link
Contributor

@mihirsoni mihirsoni left a comment

Choose a reason for hiding this comment

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

LGTM !!

@kavilla kavilla merged commit 2f18227 into opensearch-project:main Mar 26, 2021
kavilla added a commit that referenced this pull request Mar 26, 2021
* [Tests] A few easy fixes for unit tests

~25 failures still. I need to update the project to just ignore the
maps directory completely for tests instead of just ignoring one test.

Signed-off-by: Kawika Avilla <[email protected]>

* [Tests] exclude maps from jest

Signed-off-by: Kawika Avilla <[email protected]>

* [Tests] More easy fixes for unit tests

8 failures still. Committing here because the remaining but require
an agreement of next steps.

Signed-off-by: Kawika Avilla <[email protected]>

* [Tests] Update compressed files for unit tests

Files were uncompressed, renamed, and then compressed again for unit
tests.

Signed-off-by: Kawika Avilla <[email protected]>

* [Tests] Rename cli_plugin/kibana.test.js to opensearch_dashboards.test.js

Signed-off-by: Kawika Avilla <[email protected]>

* [Tests] update zip files in cli_plugin

Updated references to OpenSearch and OpenSearch Dashboards for
the zipped files with the cli_plugin for the tests to pass.

Signed-off-by: Kawika Avilla <[email protected]>

* [Tests] remove optimize/image tests

This test checks if image exists but this image was removed in the
renaming process at this commit: 3ecadd0.

Signed-off-by: Kawika Avilla <[email protected]>

* [Tests] update plugins_discovery test

Updating a test that discovers plugins to have the correct amount.
The original tests removed the creation of the mock related to x-pack.

Update the test to get the correct values while running tests.

Signed-off-by: Kawika Avilla <[email protected]>

* [Tests] update TODOs with [RENAMEME] and ref to .com

PR comment to include RENAMEME for easy grepping and update a ref
to opensearch.com to opensearch.co so that it is easier to grep while
renaming. Then had to regenerate the snapshots.

Signed-off-by: Kawika Avilla <[email protected]>
@kavilla kavilla deleted the update-unit-tests branch April 6, 2021 19:03
@aoguan1990 aoguan1990 assigned aoguan1990 and unassigned aoguan1990 Aug 9, 2022
wanglam pushed a commit to wanglam/OpenSearch-Dashboards that referenced this pull request Oct 27, 2023
…ect#192) (opensearch-project#233)

* [Workspace][Feature] Left navigation menu adjustment (opensearch-project#192)

* add util function to filter workspace feature by wildcard

Signed-off-by: Yulong Ruan <[email protected]>

* resolve conflict

Signed-off-by: yuye-aws <[email protected]>

* update tests and snapshots

Signed-off-by: yuye-aws <[email protected]>

* small adjustment to left menu

Signed-off-by: yuye-aws <[email protected]>

* resolve git conflict

Signed-off-by: yuye-aws <[email protected]>

* rename nav link service function

Signed-off-by: yuye-aws <[email protected]>

* unit test for workspace plugin.ts

Signed-off-by: yuye-aws <[email protected]>

* update snapshots

Signed-off-by: yuye-aws <[email protected]>

* optimize code

Signed-off-by: yuye-aws <[email protected]>

* optimize code

Signed-off-by: yuye-aws <[email protected]>

* optimize code

Signed-off-by: yuye-aws <[email protected]>

* optimize code

Signed-off-by: yuye-aws <[email protected]>

* optimize code

Signed-off-by: yuye-aws <[email protected]>

* optimize code

Signed-off-by: yuye-aws <[email protected]>

---------

Signed-off-by: Yulong Ruan <[email protected]>
Signed-off-by: yuye-aws <[email protected]>
Co-authored-by: Yulong Ruan <[email protected]>

* resolve conflict

Signed-off-by: yuye-aws <[email protected]>

* update snapshots

Signed-off-by: yuye-aws <[email protected]>

* resolve conflicts

Signed-off-by: yuye-aws <[email protected]>

* restore snapshot

Signed-off-by: yuye-aws <[email protected]>

* update tests

Signed-off-by: yuye-aws <[email protected]>

---------

Signed-off-by: Yulong Ruan <[email protected]>
Signed-off-by: yuye-aws <[email protected]>
Co-authored-by: Yulong Ruan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Tests] Ensure Unit test cases pass
6 participants