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
8 changes: 4 additions & 4 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ jobs:
fail-fast: false
matrix:
include:
- name: Fedora 43
- name: Fedora 45
test: TestFedora
release: "43"
release: "45"
- name: CentOS Stream 10
test: TestCentOSStream
release: "10"
Expand All @@ -67,9 +67,9 @@ jobs:
- name: Debian trixie
test: TestDebian
release: trixie
- name: Ubuntu noble
- name: Ubuntu resolute
test: TestUbuntu
release: noble
release: resolute
- name: Arch Linux latest
test: TestArch
release: latest
Expand Down
8 changes: 4 additions & 4 deletions openspec/specs/e2e-github-workflow/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ Each matrix job SHALL have a `timeout-minutes` of 5.
- **THEN** the job is cancelled by GitHub Actions

### Requirement: Matrix includes all supported distro/release tuples
The workflow matrix SHALL include the following distro/release tuples: Fedora 43, CentOS Stream 10, AlmaLinux 10, Rocky Linux 10, Debian trixie, Ubuntu noble, Arch Linux latest.
The workflow matrix SHALL include the following distro/release tuples: Fedora 45, CentOS Stream 10, AlmaLinux 10, Rocky Linux 10, Debian trixie, Ubuntu resolute, Arch Linux latest.

#### Scenario: All distros are represented in the matrix
- **WHEN** the e2e workflow is triggered
- **THEN** jobs are created for Fedora 43, CentOS Stream 10, AlmaLinux 10, Rocky Linux 10, Debian trixie, Ubuntu noble, and Arch Linux latest
- **THEN** jobs are created for Fedora 45, CentOS Stream 10, AlmaLinux 10, Rocky Linux 10, Debian trixie, Ubuntu resolute, and Arch Linux latest

### Requirement: Workflow job steps
Each matrix job SHALL checkout the repository, set up Go, and run the e2e test for the specific distro using `go test -tags e2e -run <TestFunction> ./test/e2e/` with the `E2E_RELEASE` environment variable set from the matrix.

#### Scenario: Job executes test with correct parameters
- **WHEN** a matrix job for Fedora 43 runs
- **THEN** it executes `go test -tags e2e -run TestFedora ./test/e2e/` with `E2E_RELEASE=43`
- **WHEN** a matrix job for Fedora 45 runs
- **THEN** it executes `go test -tags e2e -run TestFedora ./test/e2e/` with `E2E_RELEASE=45`
4 changes: 2 additions & 2 deletions openspec/specs/e2e-multi-distro/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The test suite SHALL include a Rocky Linux test function `TestRockyLinux` using
- **THEN** the command exits successfully and cached `.rpm` files exist under the `copr/` cache subdirectory

### Requirement: Ubuntu e2e test
The test suite SHALL include an Ubuntu test function `TestUbuntu` using a `docker.io/library/ubuntu:noble` container (or the release specified by `E2E_RELEASE`). The test SHALL configure apt with sources pointing at the pkgproxy `ubuntu` and `ubuntu-security` repositories. The `sources.list` SHALL be generated by the Go test and mounted into the container.
The test suite SHALL include an Ubuntu test function `TestUbuntu` using a `docker.io/library/ubuntu:resolute` container (or the release specified by `E2E_RELEASE`). The test SHALL configure apt with sources pointing at the pkgproxy `ubuntu` and `ubuntu-security` repositories. The `sources.list` SHALL be generated by the Go test and mounted into the container.

#### Scenario: Ubuntu metadata refresh succeeds
- **WHEN** the Ubuntu container runs `apt-get update` through pkgproxy
Expand All @@ -64,7 +64,7 @@ The pkgproxy configuration (`configs/pkgproxy.yaml`) SHALL include a `ubuntu-sec
- **THEN** the `ubuntu-security` repository is available with at least one upstream mirror

### Requirement: Fully qualified container image names
All e2e tests SHALL use fully qualified container image names including the registry (e.g., `docker.io/library/fedora:43`, `quay.io/centos/centos:stream10`). Tests SHALL NOT depend on container runtime defaults for registry resolution.
All e2e tests SHALL use fully qualified container image names including the registry (e.g., `docker.io/library/fedora:45`, `quay.io/centos/centos:stream10`). Tests SHALL NOT depend on container runtime defaults for registry resolution.

#### Scenario: Images use fully qualified names
- **WHEN** any e2e test starts a container
Expand Down
6 changes: 3 additions & 3 deletions openspec/specs/e2e-testing/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ The e2e test package SHALL use a `TestMain` function to build the pkgproxy binar
- **THEN** each starts a separate pkgproxy process from the shared binary, with its own port and cache directory

### Requirement: E2E_RELEASE environment variable for release parameterization
Each top-level e2e test function SHALL read the `E2E_RELEASE` environment variable to determine the distribution release version. If `E2E_RELEASE` is not set, the test SHALL use a sensible default release (e.g., `43` for Fedora, `trixie` for Debian, `noble` for Ubuntu, `10` for CentOS Stream/AlmaLinux/Rocky Linux).
Each top-level e2e test function SHALL read the `E2E_RELEASE` environment variable to determine the distribution release version. If `E2E_RELEASE` is not set, the test SHALL use a sensible default release (e.g., `45` for Fedora, `trixie` for Debian, `resolute` for Ubuntu, `10` for CentOS Stream/AlmaLinux/Rocky Linux).

#### Scenario: Default release is used when E2E_RELEASE is unset
- **WHEN** `TestFedora` runs without `E2E_RELEASE` set
- **THEN** the test uses the default release `43`
- **THEN** the test uses the default release `45`

#### Scenario: E2E_RELEASE overrides the default
- **WHEN** `TestFedora` runs with `E2E_RELEASE=42`
Expand Down Expand Up @@ -87,7 +87,7 @@ The `make e2e` target SHALL accept optional `DISTRO` and `RELEASE` parameters. W
- **THEN** only `TestFedora` runs with `E2E_RELEASE=42`

### Requirement: Fedora e2e test
The test suite SHALL include a top-level `TestFedora` test function using a `docker.io/library/fedora:<release>` container (where release defaults to `43` or is set via `E2E_RELEASE`). The test SHALL configure dnf to use pkgproxy for the `fedora` repository and include a COPR subtest for `ganto/jo` using the `fedora-$releasever-$basearch` pattern. GPG verification SHALL remain enabled for the base repo, disabled for COPR.
The test suite SHALL include a top-level `TestFedora` test function using a `docker.io/library/fedora:<release>` container (where release defaults to `45` or is set via `E2E_RELEASE`). The test SHALL configure dnf to use pkgproxy for the `fedora` repository and include a COPR subtest for `ganto/jo` using the `fedora-$releasever-$basearch` pattern. GPG verification SHALL remain enabled for the base repo, disabled for COPR.

#### Scenario: Fedora metadata refresh succeeds
- **WHEN** the Fedora container runs `dnf makecache` through pkgproxy
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func dnfRepoFile(t *testing.T, name string, content string) string {
}

func TestFedora(t *testing.T) {
release := releaseOrDefault("43")
release := releaseOrDefault("45")
proxyAddr, cacheDir := setupPkgproxy(t)

repoFile := dnfRepoFile(t, "fedora", fmt.Sprintf(`[fedora]
Expand Down Expand Up @@ -414,7 +414,7 @@ gpgcheck=0
}

func TestUbuntu(t *testing.T) {
release := releaseOrDefault("noble")
release := releaseOrDefault("resolute")
proxyAddr, cacheDir := setupPkgproxy(t)

sourcesList := filepath.Join(t.TempDir(), "sources.list")
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/test-dnf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ echo "==> Proxy: ${PROXY_ADDR}"
echo "==> Packages: ${PACKAGES[*]}"

# Remove all default repo files so only the mounted pkgproxy repo is used.
# Newer Fedora releases ship their stock repos in /usr/share/dnf5/repos.d.
find /etc/yum.repos.d/ -name '*.repo' ! -name 'pkgproxy-*' -delete
rm -f /usr/share/dnf5/repos.d/*.repo

echo "==> Repo files:"
for f in /etc/yum.repos.d/pkgproxy-*.repo; do
Expand Down
Loading