OpenSearch-Dashboards icon indicating copy to clipboard operation
OpenSearch-Dashboards copied to clipboard

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

Open abbyhu2000 opened this issue 3 years ago • 1 comments

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.

abbyhu2000 avatar Sep 12 '22 21:09 abbyhu2000

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

kavilla avatar Sep 27 '22 06:09 kavilla