nixosTests: fix writeText warning when userData is null

makeEc2Test's userData parameter is required but image-contents.nix
passes null, triggering a deprecation warning from writeText. Make
userData optional (defaulting to null) and create an empty user-data
file when it's not provided.
This commit is contained in:
Philip Taron 2026-03-24 16:32:03 -07:00
commit cfaddae84d
No known key found for this signature in database
2 changed files with 5 additions and 3 deletions

View file

@ -51,7 +51,6 @@ in
makeEc2Test {
name = "image-contents";
inherit image;
userData = null;
script = ''
machine.start()
# Test that if contents includes a file, it is copied to the target.