Skip to content

Commit 547edc4

Browse files
Add test back which went missing while merging
1 parent 061d37a commit 547edc4

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

lib/modules/manager/nix/extract.spec.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,35 @@ describe('modules/manager/nix/extract', () => {
434434
expect(await extractPackageFile('', 'flake.nix')).toBeNull();
435435
});
436436

437+
it('includes nixpkgs but using indirect type and path locked type that cannot be updated', async () => {
438+
const flakeLock = codeBlock`{
439+
"nodes": {
440+
"nixpkgs": {
441+
"locked": {
442+
"lastModified": 1687274257,
443+
"narHash": "sha256-TutzPriQcZ8FghDhEolnHcYU2oHIG5XWF+/SUBNnAOE=",
444+
"path": "/nix/store/22qgs3skscd9bmrxv9xv4q5d4wwm5ppx-source",
445+
"rev": "2c9ecd1f0400076a4d6b2193ad468ff0a7e7fdc5",
446+
"type": "path"
447+
},
448+
"original": {
449+
"id": "nixpkgs",
450+
"type": "indirect"
451+
}
452+
},
453+
"root": {
454+
"inputs": {
455+
"nixpkgs": "nixpkgs"
456+
}
457+
}
458+
},
459+
"root": "root",
460+
"version": 7
461+
}`;
462+
fs.readLocalFile.mockResolvedValueOnce(flakeLock);
463+
expect(await extractPackageFile('', 'flake.nix')).toBeNull();
464+
});
465+
437466
it('includes flake from GitHub Enterprise', async () => {
438467
const flakeLock = codeBlock`{
439468
"nodes": {

0 commit comments

Comments
 (0)