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

[Test] Check skipped unit tests #483

Closed
26 tasks done
ananzh opened this issue Jun 15, 2021 · 0 comments
Closed
26 tasks done

[Test] Check skipped unit tests #483

ananzh opened this issue Jun 15, 2021 · 0 comments
Assignees

Comments

@ananzh
Copy link
Member

ananzh commented Jun 15, 2021

Describe the bug

Currently, there are 258 skipped unit tests, 9 todo. We want to investigate whether we can enable the skipped tests. Some of the tests might need to be removed.

Test Suites: 23 skipped, 1411 passed, 1411 of 1434 total
Tests:       258 skipped, 9 todo, 10357 passed, 10624 total
Snapshots:   2363 passed, 2363 total

To Reproduce
Run:
yarn test:jest

Expected behavior
explore each skipped unit test and do the following step for each test suite

  1. create a sub issue for each test suite
  2. for the skipped unit test, check:
  • can we enable it? if yes, create a PR and close the issue

  • can we remove it? if yes, create a PR and close the issue

  • should we keep it? if yes, describe the reasons in the issue.

The final output is expected to be a cleaned unit test with all the skipped ones being checked.

OpenSearch Version
OpenSearch 1.0.0

Dashboards Version
Dashboards 1.0.0

Sub issues

---> 23 test suites

  • /packages/osd-config-schema/src/errors/schema_error.test.ts (skipped test num: 1)
    Issue: #486 PR: #488
  • /packages/osd-dev-utils/src/run/help.test.ts (skipped test num: 3)
    Issue: #487 PR: #489
  • /src/plugins/newsfeed/public/lib/api.test.ts (skipped test num: 18)
    Issue: #490 PR: #495
  • /src/plugins/newsfeed/public/components/empty_news.test.tsx (skipped test num: 1)
    Issue: #491 PR: #496
  • /src/plugins/newsfeed/public/components/loading_news.test.tsx (skipped test num: 1)
    Issue: #492 PR: #497
  • /src/plugins/telemetry/public/services/telemetry_sender.test.ts (skipped test num: 16)
    Issue: #498 PR: #500
  • /src/plugins/telemetry/public/services/telemetry_service.test.ts (skipped test num: 14)
    Issue: #499 PR: #502
  • /src/plugins/telemetry/public/services/telemetry_notifications/render_opt_in_banner.test.ts (skipped test num: 1)
    Issue: #503 PR: #505
  • /src/plugins/telemetry/public/services/telemetry_notifications/render_opted_in_notice_banner.test.ts (skipped test num: 1)
    Issue: #504 PR: #506
  • /src/plugins/telemetry/public/services/telemetry_notifications/telemetry_notifications.test.ts (skipped test num: 5)
    Issue: #507 PR: #522
  • /src/plugins/telemetry/server/fetcher.test.ts (skipped test num: 3)
    Issue: #508 PR: #523
  • /src/plugins/telemetry/server/telemetry_collection/get_cluster_info.test.ts (skipped test num: 1)
    Issue: #509 PR: #524
  • /src/plugins/telemetry/server/telemetry_collection/get_cluster_stats.test.ts (skipped test num: 1)
    Issue: #510 PR: #525
  • /src/plugins/telemetry/server/telemetry_collection/get_local_stats.test.ts (skipped test num: 4)
    Issue: #512 PR: #528
  • /src/plugins/telemetry/server/telemetry_collection/get_nodes_usage.test.ts (skipped test num: 1)
    Issue: #513 PR: #529
  • /src/plugins/telemetry/server/telemetry_collection/get_data_telemetry/get_data_telemetry.test.ts (skipped test num: 162)
    Issue: #514 PR: #530
  • /src/plugins/telemetry/server/telemetry_repository/get_telemetry_saved_object.test.ts (skipped test num: 3)
    Issue: #515 PR: #531
  • /src/plugins/telemetry/public/components/opt_in_banner.test.tsx (skipped test num: 3)
    Issue: #516 PR: #532
  • /src/plugins/telemetry/public/components/opt_in_message.test.tsx (skipped test num: 1)
    Issue: #517 PR: #532
  • /src/plugins/telemetry/public/components/opted_in_notice_banner.test.tsx (skipped test num: 2)
    Issue: #518 PR: #532
  • /src/plugins/telemetry_management_section/public/components/opt_in_example_flyout.test.tsx (skipped test num: 1)
    Issue: #519 PR: #534
  • /src/plugins/telemetry_management_section/public/components/opt_in_security_example_flyout.test.tsx (skipped test num: 1)
    Issue: #520 PR: #534
  • /src/plugins/telemetry_management_section/public/components/telemetry_management_section.test.tsx (skipped test num: 9)
    Issue: #521 PR: #534

---> others

  • /src/core/server/http/router/request.test.ts (skipped test num: 1)
    - Issue: #543 PR: keep as skipped
  • /src/core/server/opensearch/version_check/ensure_opensearch_version.test.ts (skipped test num: 2)
    - Issue: #477 PR: need more investigation
  • /src/cli_plugin/install/zip.test.js (skipped test num: 1)
    - Issue: #4 PR: #540

Skipped tests summary

  1. test case fetchTelemetry in test suite telemetry_service.test.ts:
    Reason to skip: test function is temporarily disabled
  2. test case doesn't expose authorization header by default in test suite request.test.ts
    Reason to skip: Discussed in #543

Future work
Issue: #307 (investigation)
Issue: #477 (investigation)
Issue: #543 (feature request)
Newsfeed: issue (?) (feature request)
Telemetry: issue (?) (feature request)
Investigate how to test permission in zip.test.js: #561
unit test relates to health version check PR #463
Clean console error/warnings: #554

@ananzh ananzh added bug Something isn't working untriaged labels Jun 15, 2021
@ananzh ananzh self-assigned this Jun 15, 2021
@ananzh ananzh removed the untriaged label Jun 18, 2021
@ananzh ananzh changed the title [BUG] Fix skipped unit tests [Test] Fix skipped unit tests Jun 18, 2021
@ananzh ananzh removed the bug Something isn't working label Jun 18, 2021
@ananzh ananzh changed the title [Test] Fix skipped unit tests [Test] Cleaning unit tests Jun 25, 2021
@ananzh ananzh changed the title [Test] Cleaning unit tests [Test] Check skipped unit tests Jun 25, 2021
@ananzh ananzh removed the v1.0.0 label Jun 30, 2021
@ananzh ananzh closed this as completed Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant