Skip to content

Commit 52191a7

Browse files
committed
add fuses to blackbox update test
1 parent 5641a26 commit 52191a7

3 files changed

Lines changed: 79 additions & 1 deletion

File tree

test/snapshots/updater/blackboxUpdateTest.js.snap

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1783,6 +1783,72 @@ exports[`linux > appimage tool: 1.0.2 > AppImage - arm64 2`] = `
17831783
}
17841784
`;
17851785

1786+
exports[`linux > appimage tool: 1.0.3 > AppImage - arm64 1`] = `
1787+
{
1788+
"linux": [
1789+
{
1790+
"arch": "arm64",
1791+
"file": "TestApp.AppImage",
1792+
"updateInfo": {
1793+
"blockMapSize": "@blockMapSize",
1794+
"sha512": "@sha512",
1795+
"size": "@size",
1796+
},
1797+
},
1798+
{
1799+
"file": "latest-linux-arm64.yml",
1800+
"fileContent": {
1801+
"files": [
1802+
{
1803+
"blockMapSize": "@blockMapSize",
1804+
"sha512": "@sha512",
1805+
"size": "@size",
1806+
"url": "TestApp.AppImage",
1807+
},
1808+
],
1809+
"path": "TestApp.AppImage",
1810+
"releaseDate": "@releaseDate",
1811+
"sha512": "@sha512",
1812+
"version": "1.0.0",
1813+
},
1814+
},
1815+
],
1816+
}
1817+
`;
1818+
1819+
exports[`linux > appimage tool: 1.0.3 > AppImage - arm64 2`] = `
1820+
{
1821+
"linux": [
1822+
{
1823+
"arch": "arm64",
1824+
"file": "TestApp.AppImage",
1825+
"updateInfo": {
1826+
"blockMapSize": "@blockMapSize",
1827+
"sha512": "@sha512",
1828+
"size": "@size",
1829+
},
1830+
},
1831+
{
1832+
"file": "latest-linux-arm64.yml",
1833+
"fileContent": {
1834+
"files": [
1835+
{
1836+
"blockMapSize": "@blockMapSize",
1837+
"sha512": "@sha512",
1838+
"size": "@size",
1839+
"url": "TestApp.AppImage",
1840+
},
1841+
],
1842+
"path": "TestApp.AppImage",
1843+
"releaseDate": "@releaseDate",
1844+
"sha512": "@sha512",
1845+
"version": "1.0.1",
1846+
},
1847+
},
1848+
],
1849+
}
1850+
`;
1851+
17861852
exports[`linux > debian - (apt) 1`] = `
17871853
{
17881854
"linux": [

test/src/updater/blackboxUpdateTest.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,16 @@ async function doBuild(
203203
name: "testapp",
204204
version,
205205
},
206+
electronFuses: {
207+
runAsNode: false,
208+
enableCookieEncryption: true,
209+
enableNodeOptionsEnvironmentVariable: false,
210+
enableNodeCliInspectArguments: false,
211+
enableEmbeddedAsarIntegrityValidation: true,
212+
onlyLoadAppFromAsar: true,
213+
loadBrowserProcessSpecificV8Snapshot: false,
214+
grantFileProtocolExtraPrivileges: false,
215+
},
206216
electronUpdaterCompatibility: "1.1", // anything above 1.0.0 works. This is to allow testing via `link:` protocol with the current workspace electron-updater package version
207217
...extraConfig,
208218
compression: "store",

test/vitest-scripts/smart-config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import isCI from "is-ci"
12
import * as path from "path"
23

34
const __dirname = import.meta.dirname
@@ -31,7 +32,8 @@ export const skippedTests = [
3132
"snapHeavyTest",
3233
]
3334
export const skipPerOSTests: Record<SupportedPlatforms, string[]> = {
34-
darwin: ["fpmTest", "macUpdaterTest"],
35+
// requires valid signing signature on CI, which we don't have yet. (Can only run locally)
36+
darwin: ["fpmTest", "macUpdaterTest", isCI ? "blackboxUpdateTest" : null].filter(Boolean) as string[],
3537
linux: ["flatpakTest"],
3638
win32: [],
3739
}

0 commit comments

Comments
 (0)