Skip to content

nixos/utils: add regressions tests to genJqSecretsReplacement - #495933

Merged
phaer merged 1 commit into
NixOS:masterfrom
ibizaman:secret
Mar 23, 2026
Merged

phaer merged 1 commit into
NixOS:masterfrom
ibizaman:secret

Conversation

@ibizaman

@ibizaman ibizaman commented Mar 2, 2026 •

Copy link
Copy Markdown
Contributor

This PR adds regression tests for all 3 variant calls of genJqSecretsReplacement I could find:

  • quotes = true && loadCredentials = false (default)
  • quotes = false && loadCredentials = false
  • loadCredentials = true

My goal of adding this, on top of just for the sake of good software engineering practices, is because I will create a subsequent PR that modifies the internals of genJqSecretsReplacement to actually work on any type of files, not just JSON. Having those regression tests will make any such kind of modification much more safe in the future.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS labels Mar 2, 2026
@ibizaman
ibizaman marked this pull request as ready for review March 2, 2026 20:27
@nixpkgs-ci nixpkgs-ci Bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Mar 3, 2026
@ibizaman

ibizaman commented Mar 3, 2026

Copy link
Copy Markdown
Contributor Author

The following builds were skipped because they don't evaluate on x86_64-linux: nixos/utils, nixos/utils.passthru.tests

Did I do something wrong in the nested tests? I don’t know what to expect for CI here.

@nixos-discourse

Copy link
Copy Markdown

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/2880

@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Mar 23, 2026
@phaer

phaer commented Mar 23, 2026

Copy link
Copy Markdown
Member

@ofborg test utils

@phaer

phaer commented Mar 23, 2026 •

Copy link
Copy Markdown
Member

Did I do something wrong in the nested tests? I don’t know what to expect for CI here.

You added an attribute utils to the list of tests. The CI jobs you see are deducing the attributes to check from the commit message (or was it PR title?), so they end up with nixos/utils here, which isn't a valid derivation.

Your commit message seems fine. One can manually ask ofborg to run one or more specific tests, which I did in my last comment above.

@phaer
phaer added this pull request to the merge queue Mar 23, 2026
Merged via the queue into NixOS:master with commit 25d0442 Mar 23, 2026
30 of 35 checks passed
@ibizaman
ibizaman deleted the secret branch March 26, 2026 21:14
@ibizaman ibizaman mentioned this pull request Mar 26, 2026
6 of 13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants