diff --git a/internal/e2e/updatetest/helpers.go b/internal/e2e/updatetest/helpers.go index 410a99999..30ef097a6 100644 --- a/internal/e2e/updatetest/helpers.go +++ b/internal/e2e/updatetest/helpers.go @@ -24,7 +24,7 @@ import ( func fetchDebPackageLatest(t *testing.T, path, repo string) string { t.Helper() - repo = fmt.Sprintf("github.com/arduino/%s", repo) + repo = fmt.Sprintf("github.com/%s", repo) cmd := exec.Command( "gh", "release", "list", "--repo", repo, diff --git a/internal/e2e/updatetest/test.Dockerfile b/internal/e2e/updatetest/test.Dockerfile index 578e71c0a..2cd95af90 100644 --- a/internal/e2e/updatetest/test.Dockerfile +++ b/internal/e2e/updatetest/test.Dockerfile @@ -1,7 +1,7 @@ FROM debian:trixie RUN apt update && \ - apt install -y systemd systemd-sysv dbus \ + apt install -y systemd systemd-sysv dbus initramfs-tools\ sudo docker.io ca-certificates curl gnupg \ dpkg-dev apt-utils adduser gzip && \ rm -rf /var/lib/apt/lists/* @@ -11,9 +11,10 @@ ARG ARCH=amd64 COPY build/stable/arduino-app-cli*_${ARCH}.deb /tmp/stable.deb COPY build/arduino-app-cli*_${ARCH}.deb /tmp/unstable.deb COPY build/stable/arduino-router*_${ARCH}.deb /tmp/router.deb +COPY build/stable/arduino-unoq-radio-firmware*_${ARCH}.deb /tmp/radio-firmware.deb -RUN apt update && apt install -y /tmp/stable.deb /tmp/router.deb \ - && rm /tmp/stable.deb /tmp/router.deb \ +RUN apt update && apt install -y /tmp/stable.deb /tmp/radio-firmware.deb /tmp/router.deb \ + && rm /tmp/stable.deb /tmp/router.deb /tmp/radio-firmware.deb \ && mkdir -p /var/www/html/myrepo/dists/trixie/main/binary-${ARCH} \ && mv /tmp/unstable.deb /var/www/html/myrepo/dists/trixie/main/binary-${ARCH}/ diff --git a/internal/e2e/updatetest/update_test.go b/internal/e2e/updatetest/update_test.go index 061a8ff6d..5c71f343b 100644 --- a/internal/e2e/updatetest/update_test.go +++ b/internal/e2e/updatetest/update_test.go @@ -21,8 +21,10 @@ func TestUpdatePackage(t *testing.T) { t.Run("Stable To Current", func(t *testing.T) { t.Cleanup(func() { os.RemoveAll("build") }) - tagAppCli := fetchDebPackageLatest(t, "build/stable", "arduino-app-cli") - fetchDebPackageLatest(t, "build/stable", "arduino-router") + tagAppCli := fetchDebPackageLatest(t, "build/stable", "arduino/arduino-app-cli") + fetchDebPackageLatest(t, "build/stable", "arduino/arduino-router") + fetchDebPackageLatest(t, "build/stable", "bcmi-labs/arduino-deb-packages") + majorTag := genMajorTag(t, tagAppCli) fmt.Printf("Updating from stable version %s to unstable version %s \n", tagAppCli, majorTag) @@ -71,8 +73,10 @@ func TestUpdatePackage(t *testing.T) { t.Run("CurrentToStable", func(t *testing.T) { t.Cleanup(func() { os.RemoveAll("build") }) - tagAppCli := fetchDebPackageLatest(t, "build", "arduino-app-cli") - fetchDebPackageLatest(t, "build/stable", "arduino-router") + tagAppCli := fetchDebPackageLatest(t, "build", "arduino/arduino-app-cli") + fetchDebPackageLatest(t, "build/stable", "arduino/arduino-router") + fetchDebPackageLatest(t, "build/stable", "bcmi-labs/arduino-deb-packages") + minorTag := genMinorTag(t, tagAppCli) fmt.Printf("Updating from unstable version %s to stable version %s \n", minorTag, tagAppCli) @@ -83,7 +87,7 @@ func TestUpdatePackage(t *testing.T) { const dockerImageName = "test-apt-update-unstable-image" buildDockerImage(t, dockerFile, dockerImageName, arch) - //TODO: t cleanup remove docker image + // TODO: t cleanup remove docker image t.Run("CLI Command", func(t *testing.T) { const containerName = "apt-test-update-unstable"