{ lib, cilib, ... }: let inherit (lib) trimWith; in { suites."Soonix" = { pos = __curPos; tests = let version = trimWith { start = true; end = true; } (builtins.readFile ../lib/VERSION); in [ { name = "default soonix config"; expected = { data.include = [ { component = "gitlab.com/TECHNOFAB/nix-gitlab-ci/nix-gitlab-ci@${version}"; inputs.version = version; } ]; generator = "nix"; opts.format = "yaml"; hook = { mode = "copy"; gitignore = false; }; output = ".gitlab-ci.yml"; }; actual = (cilib.mkCI { config.soonix = {}; }).soonix; } { name = "custom soonix config"; expected = { data = { include = [ { component = "gitlab.com/example/nix-gitlab-ci/nix-gitlab-ci@abc"; inputs = { version = "abc"; hello = "world"; }; } ]; "example".script = ["hello"]; }; generator = "nix"; opts.format = "yaml"; hook = { mode = "copy"; gitignore = false; }; output = ".gitlab-ci.yml"; }; actual = (cilib.mkCI { config.soonix = { componentVersion = "abc"; componentUrl = "gitlab.com/example/nix-gitlab-ci/nix-gitlab-ci"; componentInputs = { hello = "world"; }; extraData = { "example".script = ["hello"]; }; }; }).soonix; } ]; }; }