Skip to content

Commit

Permalink
Add test for indirect type
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 committed Oct 14, 2024
1 parent 3109449 commit 9146253
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
25 changes: 25 additions & 0 deletions lib/modules/manager/nix/__fixtures__/flake.9.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1728538411,
"narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}
5 changes: 5 additions & 0 deletions lib/modules/manager/nix/extract.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const flake5Lock = Fixtures.get('flake.5.lock');
const flake6Lock = Fixtures.get('flake.6.lock');
const flake7Lock = Fixtures.get('flake.7.lock');
const flake8Lock = Fixtures.get('flake.8.lock');
const flake9Lock = Fixtures.get('flake.9.lock');

describe('modules/manager/nix/extract', () => {
it('returns null when no inputs', () => {
Expand Down Expand Up @@ -87,4 +88,8 @@ describe('modules/manager/nix/extract', () => {
},
]);
});

it('includes nixpkgs but using indirect type that cannot be updated', () => {
expect(extractPackageFile(flake9Lock, 'flake.lock')).toBeNull();
});
});

0 comments on commit 9146253

Please sign in to comment.