Files
home-manager/tests/modules/services/podman-linux/volume.nix
Timothy Gallion 38e187fd2f podman-linux: fix tests expected results and modules
Update the expected results to match changes in the podman generator
and fix not importing the podman stub overlay with module import
behind `mkIf` introduced in #6905.
2026-01-06 13:35:00 +01:00

45 lines
1.1 KiB
Nix

{ config, lib, ... }:
{
imports = [ ./podman-stubs.nix ];
config = lib.mkIf config.test.enableLegacyIfd {
services.podman = {
enable = true;
volumes = {
"my-vol" = {
device = "tmpfs";
extraConfig = {
Volume = {
User = 1000;
};
};
extraPodmanArgs = [ "--module=/etc/nvd.conf" ];
group = 1000;
type = "tmpfs";
};
"my-vol-2" = {
extraConfig = {
Volume = {
VolumeName = "some-other-volume-name";
};
};
};
};
};
test.asserts.assertions.expected = [
''In 'my-vol-2' config. Volume.VolumeName: 'some-other-volume-name' does not match expected type: value "my-vol-2" (singular enum)''
];
nmt.script = ''
configPath=home-files/.config/systemd/user
volumeFile=$configPath/podman-my-vol-volume.service
assertFileExists $volumeFile
volumeFile=$(normalizeStorePaths $volumeFile)
assertFileContent $volumeFile ${./volume-expected.service}
'';
};
}