Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions test/snapshots/updater/blackboxUpdateTest.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,72 @@ exports[`Electron autoupdate (fresh install & update) > linux > AppImage - arm64
}
`;

exports[`Electron autoupdate (fresh install & update) > linux > AppImage - x64 1`] = `
{
"linux": [
{
"arch": "x64",
"file": "TestApp.AppImage",
"updateInfo": {
"blockMapSize": "@blockMapSize",
"sha512": "@sha512",
"size": "@size",
},
},
{
"file": "latest-linux.yml",
"fileContent": {
"files": [
{
"blockMapSize": "@blockMapSize",
"sha512": "@sha512",
"size": "@size",
"url": "TestApp.AppImage",
},
],
"path": "TestApp.AppImage",
"releaseDate": "@releaseDate",
"sha512": "@sha512",
"version": "1.0.0",
},
},
],
}
`;

exports[`Electron autoupdate (fresh install & update) > linux > AppImage - x64 2`] = `
{
"linux": [
{
"arch": "x64",
"file": "TestApp.AppImage",
"updateInfo": {
"blockMapSize": "@blockMapSize",
"sha512": "@sha512",
"size": "@size",
},
},
{
"file": "latest-linux.yml",
"fileContent": {
"files": [
{
"blockMapSize": "@blockMapSize",
"sha512": "@sha512",
"size": "@size",
"url": "TestApp.AppImage",
},
],
"path": "TestApp.AppImage",
"releaseDate": "@releaseDate",
"sha512": "@sha512",
"version": "1.0.1",
},
},
],
}
`;

exports[`Electron autoupdate (fresh install & update) > linux > arch - (pacman) 1`] = `
{
"linux": [
Expand Down
1 change: 1 addition & 0 deletions test/src/helpers/launchAppCrossPlatform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ export function startXvfb(): { display: string; stop: () => void } {
})
})

console.log("Xvfb started on display", display)
return {
display,
stop,
Expand Down
35 changes: 31 additions & 4 deletions test/src/updater/Dockerfile-archlinux
Original file line number Diff line number Diff line change
@@ -1,14 +1,41 @@
FROM archlinux:latest
FROM archlinux:base-20250629.0.373469

RUN pacman -Syu --noconfirm && \
pacman -S --noconfirm \
RUN pacman -Sy --noconfirm archlinux-keyring \
&& pacman -S --noconfirm gnupg \
&& pacman-key --init \
&& pacman-key --populate archlinux \
&& pacman-key --refresh-keys \
&& pacman -Syu --noconfirm \
&& pacman -S --noconfirm \
libxcrypt-compat \
base-devel \
git \
nodejs \
npm \
xorg-server-xvfb \
&& pacman -Scc --noconfirm
&& pacman -Scc --noconfirm \
&& rm -rf /var/lib/pacman/sync/* /var/cache/pacman/pkg/*

# install prerequisites for building
RUN pacman -Sy --noconfirm archlinux-keyring \
&& pacman -Syu --noconfirm \
&& pacman -S --noconfirm base-devel git sudo \
&& pacman -Scc --noconfirm \
&& rm -rf /var/lib/pacman/sync/* /var/cache/pacman/pkg/*

# create a non-root user for makepkg
RUN useradd -m builder && echo "builder ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/builder

USER builder
WORKDIR /home/builder

# build http-parser from AUR
RUN git clone https://aur.archlinux.org/http-parser.git \
&& cd http-parser \
&& makepkg -si --noconfirm

USER root
WORKDIR /project

RUN npm --silent install --global --depth 0 pnpm

Expand Down
17 changes: 10 additions & 7 deletions test/src/updater/Dockerfile-debian
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
FROM debian:bookworm-slim
FROM node:20-bookworm

RUN apt-get update && apt-get install -y curl gnupg xz-utils xvfb zypper binutils libasound2
# Install system + Electron runtime deps
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl gnupg xz-utils xvfb zypper binutils \
libasound2 libgtk-3-0 libnotify4 libnss3 libxss1 libxtst6 \
xdg-utils libatspi2.0-0 libsecret-1-0 libgbm1 \
&& rm -rf /var/lib/apt/lists/*

RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
RUN apt-get install -y nodejs
RUN npm --silent install --global --depth 0 pnpm

RUN npm --silent install --global --depth 0 pnpm

WORKDIR /project
WORKDIR /project