Repository navigation
spec: add tests for the autoUpdater on macOS that actually test if it works - #17442
Conversation
eae5f99 to
5f6213e
Compare
| const fixturesPath = path.resolve(__dirname, '../spec/fixtures') | ||
|
|
||
| // We can only test the auto updater on darwin non-component builds | ||
| const describeFn = (process.platform === 'darwin' && !process.mas && !features.isComponentBuild() ? describe : describe.skip) |
There was a problem hiding this comment.
i see the value in this style but i think it makes things a bit harder to read potentially 🤔
codebytere
left a comment
There was a problem hiding this comment.
Generally looks thorough and good to me, although given it's a big diff i'd like another review to ensure that i didn't miss anything!
nornagon
left a comment
There was a problem hiding this comment.
Is there any particular reason to have a passphrase on the private key?
| let identity = '' | ||
|
|
||
| beforeEach(function () { | ||
| const result = cp.spawnSync('bash', [path.resolve(__dirname, '../script/codesign/get-trusted-identity.sh')]) |
There was a problem hiding this comment.
i don't believe you need bash here if the .sh is +x
There was a problem hiding this comment.
@nornagon You'd think so, but it worked on CI without bash and blew up locally. This seemed like a reasonable option to ensure it worked everywhere.
There was a problem hiding this comment.
blew up how? that seems relevant
Why not when we can 😄 Hypotheticals come to mind around our CI machine and it trusting things signed with that cert and so on 🤔 Better safe than sorry 👍 |
a7f6839 to
809a8b5
Compare
…oupdate specs on MAS
809a8b5 to
e1278c5
Compare
|
No Release Notes |
Description of Change
This is part of some ongoing work to increase confidence in our CI runs / releases. Previously our
autoUpdaterspecs only tested the methods didn't throw errors, or correctly returned the previously setfeedUrl.These specs actually go E2E in the update process to ensure that an app can actually successfully update if they are using the built in updater API.
These tests will only run if:
debugbuilds will not run these testsIf there is not a valid code signing cert on your machine the tests will be skipped unless running in CI mode in which case the tests will be marked as failed so that the fact their isn't a valid code signing cert on the machine can be addressed.
On CI I have added a self-signed code signing certificate to our build, this certificate is useless to anyone (as it's self-signed) and the password for the cert is securely stored in 1Password / CI secrets.
Release Notes
Notes: no-notes