opensearch-project / OpenSearch-Dashboards

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

[BUG] Allow running test server in Unix-like operating systems #1263

Open RoyiSitbon opened 2 years ago

RoyiSitbon commented 2 years ago

Describe the bug Trying to run e2e on my darwin OS local environment using the next 2 commands: node scripts/functional_tests_server.js --config test/plugin_functional/config.ts node scripts/functional_test_runner.js --config test/plugin_functional/config.ts and got several failures along the way.

  1. Browser chrome driver was not supported, since my chrome version was higher than the one inside our package.json.

    Screen Shot 2022-02-18 at 16 47 59
  2. OS was not supported, although it was a Unix-like system, and running the Linux snapshot on top of it as a test server works great.

    Screen Shot 2022-02-18 at 16 18 16
  3. Failed to run tests because we have non-functions exports inside our tests files, and this is bad behavior:

    Screen Shot 2022-02-18 at 16 56 27

Expected behavior

  1. Currently we changed the version manually, but maybe we can think of a different alternative. e.g npx chrome-driver based on chrome version. WDYT?
  2. Allow running test server on top of UNIX-like systems as well
  3. Remove non-allowed exports, since not in use.
kavilla commented 2 years ago

Hey @RoyiSitbon,

Currently we changed the version manually, but maybe we can think of a different alternative. e.g npx chrome-driver based on chrome version. WDYT?

Can we create another issue this? Thanks for bringing this up and I think this should be talked about. There are other issues related to the chromedriver that would be beneficial to have a separate discussion.

Allow running test server on top of UNIX-like systems as well

I see you opened a PR for this so I will comment the same there. You can set TEST_OPENSEARCH_FROM [DOC], to point to your version of OpenSearch. Then it won't download an artifact based on your OS even if it's not supported. But the goal is to have more platforms supported for example: https://github.com/opensearch-project/opensearch-build/issues/33.

Failed to run tests because we have non-functions exports inside our tests files, and this is bad behavior:

Not sure I'm seeing that, is it related to chromedriver 98?

Thanks!

seanneumann commented 2 years ago

@ahopp @kavilla can we triage this? Next steps?