Skip to content

test(sbom): slim down the SBOM e2e suite - #348

Draft
reyreavman wants to merge 2 commits into
mainfrom
test/sbom/slim-down-e2e-suite
Draft

reyreavman wants to merge 2 commits into
mainfrom
test/sbom/slim-down-e2e-suite

Conversation

@reyreavman

Copy link
Copy Markdown
Collaborator

Summary

The SBOM e2e suite reported 180 specs where 113 existed, and ran every scenario twice on two container backends that execute the same code. It now declares 44 build-driven specs, plus 30 validate specs in a separate suite that needs no container registry.

What

  • Every XEntry for native-chroot / native-rootless is gone (67 of them across 22 files). They were Pending in every CI job, so no coverage changes.
  • Every buildkit-docker entry is gone (39 of them). All fixtures under test/e2e/sbom/_fixtures are Stapel; DOCKER_BUILDKIT is read only by the docker CLI BuildKitEnabled() and only affects the Dockerfile build path, which a Stapel image on the docker backend never takes — DockerServerBackend.HasStapelBuildSupport() returns false and BuildStapelStage panics there. Both entries drove the identical code path.
  • setupEnvOptions / sbomTestOptions and the backend switch in setupSbomBuildEnv are gone; the helper now pins WERF_BUILDAH_MODE=docker and unsets DOCKER_BUILDKIT.
  • 37 tables left with a single entry became plain It blocks. The two tables that keep a real axis (--ispras-format container/oss) stay DescribeTable.
  • multiplatform_test.go is removed: both of its tables consisted exclusively of Buildah XEntrys. The registry helpers signing_multiplatform_test.go still uses moved to helpers_test.go; injectFactoryPmFiles, mustExtractCycloneDXBOM and containerFactoryImageRef had no remaining callers and are deleted. Per-platform SBOM artifacts, their in-toto subjects and the per-platform cache hit stay covered by signing_multiplatform_test.go.
  • validate_test.go and its 22 JSON fixtures move to test/e2e/sbom-validate. That suite requires only dockersbom validate runs the sbom-checker container — so it no longer demands WERF_TEST_K8S_DOCKER_REGISTRY, buildah on linux, or a werf host purge after each of its 30 specs. Labels are unchanged, so CI keeps running them in e2e_simple.
  • VERIFIED on a local registry, arm64 host: the suite fails the same 18 scenarios before and after this change (container-factory builder bases are amd64-only), with no new failure; test/e2e/sbom-validate passes 30/30 with WERF_TEST_K8S_DOCKER_REGISTRY unset.
  • Nothing outside test/e2e/sbom and the new suite changes: no workflow, no Taskfile, no shared test/pkg helper.

Why

The backend matrix was inherited from the Dockerfile-based build suites, where DOCKER_BUILDKIT does select a different builder. In a Stapel-only suite it bought a second, identical run of every scenario, while the one backend that genuinely differs — Buildah — was disabled in every entry. Deleting the dead axis rather than keeping a token representative pair keeps the suite honest about what it exercises: re-enabling Buildah is a separate change that has to make SBOM generation work there first.

…ries

Every table in the SBOM e2e suite carried four backend entries: two active
(vanilla-docker, buildkit-docker) and two XEntry ones for Buildah that ran
nowhere, so CI reported 180 specs where 113 existed. All fixtures in the
suite are Stapel and DOCKER_BUILDKIT only reaches the Dockerfile build
path, so the buildkit entry executed the same code as the vanilla one.

Tables left with a single entry become plain It blocks, the multi-platform
specs gated on Buildah alone are gone, and their registry helpers that
other specs still use moved to helpers_test.go.

Signed-off-by: Radmir Khurum <radmir.khurum@flant.com>
The sbom validate specs only run the CLI against local CycloneDX fixtures,
yet they lived in the SBOM suite and so demanded WERF_TEST_K8S_DOCKER_REGISTRY,
buildah on linux and a werf host purge after every one of the 30 specs.

They move to their own suite, which requires docker alone — the validation
itself runs in the sbom-checker container — so the specs now run against a
plain checkout with no registry set up.

Signed-off-by: Radmir Khurum <radmir.khurum@flant.com>
@reyreavman
reyreavman force-pushed the test/sbom/slim-down-e2e-suite branch from 0a20146 to 3b20186 Compare September 23, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant