test/integration/jw-pkg/secrets: Add test #137

Merged
Jan Lindemann merged 1 commit from jan/feature/20261003-test-integration-jw-pkg-secrets-add-test into master 2026-10-03 16:27:50 +02:00 AGit
Owner

test/integration/jw-pkg/secrets: Add test

Drive the real jw-pkg secrets CLI in-process against a GPG-encrypted tarball in the canonical layout: reverse-domain host prefixes plus a default tree, host wins. The distro is stubbed only in its package file list; argument parsing, DistroContext, install, template compilation and cleanup run as production code.

The fixture package carries three templates: one secret present in both host and default trees (the host entry must win), one present only in the default tree, and one missing from the tarball entirely (install must not extract it). A tar member that is not a secret of the package must not be extracted either.

Trees whose FileContext supports the targpg:// scheme address the tar source through that scheme, with the tarball location in the environment, and additionally exercise the rooted-URI rejection and the install from the on-host file tree; earlier trees install from the tarball URI directly.

The Makefile's SECRETS_TEST_BASE variable pins the fixture to a persistent directory that survives the test run for inspection.

#### test/integration/jw-pkg/secrets: Add test Drive the real `jw-pkg secrets` CLI in-process against a GPG-encrypted tarball in the canonical layout: reverse-domain host prefixes plus a default tree, host wins. The distro is stubbed only in its package file list; argument parsing, DistroContext, install, template compilation and cleanup run as production code. The fixture package carries three templates: one secret present in both host and default trees (the host entry must win), one present only in the default tree, and one missing from the tarball entirely (install must not extract it). A tar member that is not a secret of the package must not be extracted either. Trees whose FileContext supports the targpg:// scheme address the tar source through that scheme, with the tarball location in the environment, and additionally exercise the rooted-URI rejection and the install from the on-host file tree; earlier trees install from the tarball URI directly. The Makefile's `SECRETS_TEST_BASE` variable pins the fixture to a persistent directory that survives the test run for inspection.
test/integration/jw-pkg/secrets: Add test
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m36s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m46s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m14s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m35s
CI / Packaging test (push) Successful in 0s
ec405d4107
Drive the real "jw-pkg secrets" CLI in-process against a GPG-encrypted
tarball in the canonical layout: reverse-domain host prefixes plus a
default tree, host wins. The distro is stubbed only in its package file
list; argument parsing, DistroContext, install, template compilation and
cleanup run as production code.

The fixture package carries three templates: one secret present in both
host and default trees (the host entry must win), one present only in the
default tree, and one missing from the tarball entirely (install must not
extract it). A tar member that is not a secret of the package must not be
extracted either.

Trees whose FileContext supports the targpg:// scheme address the tar
source through that scheme, with the tarball location in the environment,
and additionally exercise the rooted-URI rejection and the install from
the on-host file tree; earlier trees install from the tarball URI
directly.

The Makefile's SECRETS_TEST_BASE variable pins the fixture to a persistent
directory that survives the test run for inspection.

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.0.0
Jan Lindemann scheduled this pull request to auto merge when all checks succeed 2026-10-03 16:17:25 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
janware/jw-pkg!137
No description provided.