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

Make native-messaging-test-runner use desktop_proxy #11923

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

dani-garcia
Copy link
Member

@dani-garcia dani-garcia commented Nov 8, 2024

🎟️ Tracking

📔 Objective

While debugging some issues around the DDG integration I've changed the way the test runner connects to the IPC socket and made it use the desktop_proxy binary rather than a direct IPC connection. This matches better with what the browsers actually do, so I think this should be a better way to test compatibility.

Coincidentally, the test runner hasn't been working correctly since the IPC changes, as the IPC socket path has changed to be located in a sandboxed location rather than the user tmp dir. The use of desktop_proxy also fixes that, as it's using the correct directory.

I've only tested this lightly and for the purposes of debugging DDG, so it might need some extra testing.

Also, at the moment I've hardcoded the path to desktop_proxy to be inside /Applications/Bitwarden.app. This will make it work against AppStore and TestFlight builds, and DMG builds if the application is installed into the Applications folder.

I've also included a commented out option to use a local debug build of it. When testing against a prod application we want to use the prod desktop_proxy, while when testing against a debug build or npm run electron we want to use the debug build, as the IPC won't be in a sandboxed path in this case. I'm not sure how this test runner is used by others in practice, so we might want to let this path be configurable.

📸 Screenshots

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

Copy link
Contributor

github-actions bot commented Nov 8, 2024

Logo
Checkmarx One – Scan Summary & Detailsc02524d3-5d2e-40eb-8e99-d90a5e13fb6b

No New Or Fixed Issues Found

Copy link

codecov bot commented Nov 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 33.41%. Comparing base (5592d64) to head (23f711e).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #11923   +/-   ##
=======================================
  Coverage   33.41%   33.41%           
=======================================
  Files        2841     2841           
  Lines       89008    89008           
  Branches    16979    16979           
=======================================
  Hits        29744    29744           
  Misses      56927    56927           
  Partials     2337     2337           

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants