opensearch-project / OpenSearch-Dashboards

📊 Open source visualization dashboards for OpenSearch.
https://opensearch.org/docs/latest/dashboards/index/
Apache License 2.0
1.6k stars 820 forks source link

[Improvement] Fix integration tests to avoid strict log output comparisons #2329

Open abbyhu2000 opened 1 year ago

abbyhu2000 commented 1 year ago

Describe the bug

Previously the two integration tests failed when package canuise is outdated because they are comparing snapshots log output. We should modify the tests so they are not comparing the snapshot of log messages but comparing the actual code. Relates to https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2322

The two integration tests that are failing in packages/osd-plugin-helpers/src/integration_tests/build.test.ts

  1. builds a generated plugin into a viable archive
  2. builds a non-semver generated plugin into a viable archive

Error messages:

    -  info copying assets from `public/assets` to build
    -  info copying server source into the build and converting with babel
    +  │ warn worker stderr Browserslist: caniuse-lite is outdated. Please run:
    +  │ warn worker stderr   npx browserslist@latest --update-db
    +  │ warn worker stderr   Why you should do it regularly: 
https://github.com/browserslist/browserslist#browsers-data-updating

Expected behavior The two integration tests should not fail.

kavilla commented 1 year ago

Thanks @abbyhu2000, I have marked as an improvement and marked as good first issue. I think your proposals make sense