mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-12 02:00:13 +01:00
32 lines
711 B
Nix
32 lines
711 B
Nix
{
|
|
pkgs,
|
|
ntlib,
|
|
cilib,
|
|
...
|
|
}: {
|
|
suites."Utils" = {
|
|
pos = __curPos;
|
|
tests = [
|
|
{
|
|
name = "commitAndPushFiles";
|
|
type = "script";
|
|
script = let
|
|
inherit (cilib) utils;
|
|
job = ntlib.helpers.toJsonFile (
|
|
utils.commitAndPushFiles {
|
|
message = "hello world";
|
|
files = ["a.md" "b.txt"];
|
|
} {}
|
|
);
|
|
in
|
|
# sh
|
|
''
|
|
${ntlib.helpers.path [pkgs.gnugrep]}
|
|
${ntlib.helpers.scriptHelpers}
|
|
assert_file_contains ${job} 'git commit -m \\"hello world\\"'
|
|
assert_file_contains ${job} 'git add a.md b.txt'
|
|
'';
|
|
}
|
|
];
|
|
};
|
|
}
|