mastodon/gotosocial e2e tests: infrastructure changes (#1273)

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1273
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Reviewed-by: Gusted <gusted@noreply.code.forgejo.org>
Co-authored-by: famfo <famfo@famfo.xyz>
Co-committed-by: famfo <famfo@famfo.xyz>
This commit is contained in:
famfo 2025-12-05 10:40:47 +00:00 committed by Michael Kriese
parent 4622f0fe78
commit 891e8f2d81
No known key found for this signature in database
GPG key ID: F128CBE6AB3A7201
5 changed files with 39 additions and 17 deletions

View file

@ -120,7 +120,13 @@ jobs:
path: |
/srv/forgejo-binaries/gitlab
key: gitlab
- run: |
- name: setup dbus
run: |
apt-get -q install -y -qq dbus
systemctl enable --now dbus
- name: run test_federation
run: |
chown -R forgejo:forgejo .
su forgejo -c "./end-to-end.sh test_federation"
- if: ${{ needs.build.outputs.built == 'yes' }}
uses: ./.forgejo/upload-coverage

View file

@ -1,27 +1,33 @@
FROM data.forgejo.org/oci/node:20-bookworm
FROM code.forgejo.org/oci/node:22-trixie
ENV PATH=$PATH:/setup-forgejo
ENV _CONTAINERS_USERNS_CONFIGURED=""
ADD https://code.forgejo.org/actions/setup-forgejo.git /setup-forgejo
RUN apt-get update && \
apt-get --assume-yes --no-install-recommends install \
aardvark-dns \
ca-certificates \
curl \
daemon \
fuse-overlayfs \
gettext \
git \
jq \
libcap2-bin \
neovim \
nftables \
passt \
podman \
podman-compose \
podman-docker \
procps \
pup \
slirp4netns \
sqlite3 \
sudo \
tcpdump \
uidmap \
wget && \
adduser forgejo-tests && \
adduser -u 1001 forgejo-tests && \
groupadd wheel && \
adduser forgejo-tests wheel && \
echo "%wheel ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers && \
@ -29,9 +35,13 @@ RUN apt-get update && \
echo "forgejo-tests:10000:9999" > /etc/subgid && \
mkdir /srv/forgejo-binaries && \
chown forgejo-tests:forgejo-tests /srv/forgejo-binaries && \
apt-get clean
apt-get clean && \
apt-get autoremove --purge && \
apt-get autoclean
COPY . /e2e
COPY --chown=1001:1001 . /e2e
RUN git clone https://code.forgejo.org/actions/setup-forgejo.git /setup-forgejo
USER forgejo-tests

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# SPDX-License-Identifier: MIT
SELF_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

View file

@ -74,15 +74,21 @@ function test_federation() {
local versions="${1:-$RELEASE_NUMBERS}"
for version in $versions; do
# name, minimum version
# NOTE: newline seperated, not comma :>
scenarios=(
"star 7.1"
)
if dpkg --compare-versions $version lt 7.1; then
continue
fi
for scenario_version_str in "${scenarios[@]}"; do
IFS=' ' declare -a scenario_version="($scenario_version_str)"
federation_setup $version
if dpkg --compare-versions "$version" lt "${scenario_version[1]}"; then
continue
fi
for scenario in star; do
run federation_verify_scenario $scenario
federation_setup "$version"
run federation_verify_scenario "${scenario_version[0]}"
done
done
}

View file

@ -50,9 +50,9 @@ function dependencies() {
$SUDO chmod +x /usr/local/bin/forgejo-curl.sh
fi
if ! which make curl daemon git-lfs jq sqlite3 skopeo >/dev/null; then
if ! which make curl daemon git-lfs jq sqlite3 skopeo podman podman-compose pup >/dev/null; then
$SUDO apt-get update -qq
$SUDO apt-get install -y -qq make curl daemon git-lfs jq sqlite3 skopeo
$SUDO apt-get install -y -qq make curl daemon git-lfs jq sqlite3 skopeo podman podman-compose pup
fi
if ! test -f /usr/local/bin/mc || ! test -f /usr/local/bin/minio; then