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

[Tests] Updates for integration tests (#208) #239

Merged
merged 6 commits into from
Apr 2, 2021

Conversation

kavilla
Copy link
Member

@kavilla kavilla commented Mar 31, 2021

Description

Updated snapshots were required due to renaming and was executed with: yarn run test:jest_integration -u. Made the appropriate updates for integration tests to pass. This required updating some files to have the correct values, ignoring a test suite that required downloading an OpenSearch snapshot which we do not have a valid URL, and finally I updated an element that would make the snapshot become logoElastic.

Detailed explanation:

ignoring a test suite that required downloading an OpenSearch snapshot which we do not have a valid URL

In the file osd-opensearch/src/artifact.js there is a reference to the snapshot URL that was invalid which the tests in ui_settings/integration_tests/index.test.ts and ui_settings/create_or_upgrade_saved_config/integration_tests/create_or_upgrade.test.ts required so ignored that test for now.

I updated an element that would make the snapshot become logoElastic

In src/core/public/application/ui/app_container.tsx, EuiLoadingElastic would actually have the logoElastic and so if you ran the app and update the url to have a non-existent endpoint it will have the Elastic Logo. I picked the spinner but we can talk about if it was the right choice. But after making the update and re-generating the snapshots the logoElastic is no longer there.

After the above I was able to run the integration tests and here is the output:

Test Suites: 3 skipped, 47 passed, 47 of 50 total
Tests:       22 skipped, 412 passed, 434 total
Snapshots:   75 passed, 75 total
Time:        195.856 s, estimated 216 s

Finally just some missed renames of kibana that can technically be taken out of this PR.

Issues Resolved

#208

Check List

  • New functionality includes testing.
    • All tests pass
  • [ ] New functionality has been documented.
    • [ ] New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

Updated automated snapshots by running yarn test:jest_integration -u
However there is a snapshot being updated to an old logo so I'm trying
to find out where that is being generated.

Fixed some broken test cases due to incorrect imports or newlines.

Signed-off-by: Kawika Avilla <[email protected]>
Noticed these scripts were unchanged so I updated them.

Signed-off-by: Kawika Avilla <[email protected]>
Missed references to elastic.

Signed-off-by: Kawika Avilla <[email protected]>
These tests try to download snapshots that are no longer valid.
Ignoring and adding the [RENAMEME] when we have a valid URL
to download snapshots from.

Signed-off-by: Kawika Avilla <[email protected]>
Key for a response body was incorrect.

Signed-off-by: Kawika Avilla <[email protected]>
Update to use a more generic spinner for app routing
because the previous spinner would use logoElastic.
Therefore when updating the snapshot would have logoElastic.

Signed-off-by: Kawika Avilla <[email protected]>
@kavilla kavilla linked an issue Mar 31, 2021 that may be closed by this pull request
3 tasks
@odfe-release-bot
Copy link

✅   DCO Check Passed 16fc2ea

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 !! Thanks for the changes.

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 76f4035 into opensearch-project:main Apr 2, 2021
kavilla added a commit that referenced this pull request Apr 5, 2021
* [Tests] update integration snapshots (#208)

Updated automated snapshots by running yarn test:jest_integration -u
However there is a snapshot being updated to an old logo so I'm trying
to find out where that is being generated.

Fixed some broken test cases due to incorrect imports or newlines.

* [Build] renamed scripts in dev/build/tasks

Noticed these scripts were unchanged so I updated them.

* [Tests] rename comments

Missed references to elastic.

* [Tests] ignore tests that download snapshots

These tests try to download snapshots that are no longer valid.
Ignoring and adding the [RENAMEME] when we have a valid URL
to download snapshots from.

* [Tests] update stats test to expected value

Key for a response body was incorrect.

* [Tests] update spinner to remove logo

Update to use a more generic spinner for app routing
because the previous spinner would use logoElastic.
Therefore when updating the snapshot would have logoElastic.

Signed-off-by: Kawika Avilla <[email protected]>
@kavilla kavilla deleted the integ-test branch April 6, 2021 19:02
raintygao pushed a commit to raintygao/OpenSearch-Dashboards that referenced this pull request Oct 26, 2023
…ect#239)

* Add simple string query flags options to find method

Signed-off-by: Hailong Cui <[email protected]>

* fix osd boostrap

Signed-off-by: Hailong Cui <[email protected]>

* Add unit test

Signed-off-by: Hailong Cui <[email protected]>

---------

Signed-off-by: Hailong Cui <[email protected]>
Hailong-am added a commit to Hailong-am/OpenSearch-Dashboards that referenced this pull request Mar 22, 2024
…ect#239)

* Add simple string query flags options to find method

Signed-off-by: Hailong Cui <[email protected]>

* fix osd boostrap

Signed-off-by: Hailong Cui <[email protected]>

* Add unit test

Signed-off-by: Hailong Cui <[email protected]>

---------

Signed-off-by: Hailong Cui <[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 jest Integrations test cases pass
4 participants