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

Fix PhantomJS test problems #3142

Merged
merged 2 commits into from
Oct 16, 2024
Merged

Fix PhantomJS test problems #3142

merged 2 commits into from
Oct 16, 2024

Conversation

lunkwill42
Copy link
Member

@lunkwill42 lunkwill42 commented Oct 15, 2024

PhantomJS development has ceased. Our CI test suite currently fails because the outdated version of PhantomJS we're using for the JS tests is trying to use OpenSSL features that are no longer present in more recent versions of OpenSSL:


15 10 2024 05:25:09.525:ERROR [launcher]: PhantomJS stdout: 
15 10 2024 05:25:09.525:ERROR [launcher]: PhantomJS stderr: Auto configuration failed
140546702575424:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libproviders.so): libproviders.so: cannot open shared object file: No such file or directory
140546702575424:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
140546702575424:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=providers, path=providers
140546702575424:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=providers

This PR fixes the problem by temporarily disabling OpenSSL during the running of the test suite on GitHub actions (specifically). The test suite still runs fine on the Docker test image supplied with NAV, since it is based on a slightly older Ubuntu.

For good measure, the PR also updates the workflow to use Node 18, just as the Docker image does.

The future of PhantomJS

We should consider removing PhantomJS from our test suite entirely. It is debatable whether is serves any purpose, since we also test on real JS engines like Firefox and Chrome.

Ensures we use the same Node version as our docker test image.
Copy link

github-actions bot commented Oct 15, 2024

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 992 0 11.34s
✅ PYTHON ruff 987 0 0.1s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

Copy link

github-actions bot commented Oct 15, 2024

Test results

    9 files      9 suites   8m 14s ⏱️
2 134 tests 2 134 ✅  0 💤 0 ❌
4 007 runs  3 997 ✅ 10 💤 0 ❌

Results for commit 2ef65c3.

♻️ This comment has been updated with latest results.

PhantomJS is outdated and tries to use parts of OpenSSL that are no
longer there.  We shouldn't need SSL for the JS tests, so this attempts
to disable it temporarily during the test run.
@lunkwill42 lunkwill42 changed the title Run JS tests under Node 18 Fix PhantomJS test problems Oct 15, 2024
Copy link

sonarcloud bot commented Oct 15, 2024

Copy link

codecov bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.44%. Comparing base (1e9d859) to head (2ef65c3).
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3142   +/-   ##
=======================================
  Coverage   60.44%   60.44%           
=======================================
  Files         605      605           
  Lines       43749    43749           
  Branches       48       48           
=======================================
  Hits        26443    26443           
  Misses      17294    17294           
  Partials       12       12           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@podliashanyk podliashanyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Have also created an issue regarding removing PhantomJS: #3143

@lunkwill42 lunkwill42 merged commit d619998 into master Oct 16, 2024
13 of 14 checks passed
@lunkwill42 lunkwill42 deleted the test/phantomjs-ci-problems branch October 16, 2024 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants