hive: Add tests for nodeSpecialArgs

This commit is contained in:
Zhaofeng Li 2022-07-01 16:31:13 -07:00
parent 1b045eb38d
commit ea1e7684f1

View file

@ -486,6 +486,33 @@ fn test_meta_special_args() {
"#); "#);
} }
#[test]
fn test_meta_node_special_args() {
TempHive::valid(r#"
{
meta.specialArgs = {
someArg = "global";
};
meta.nodeSpecialArgs.node-a = {
someArg = "node-specific";
};
node-a = { someArg, ... }:
assert someArg == "node-specific";
{
boot.isContainer = true;
};
node-b = { someArg, ... }:
assert someArg == "global";
{
boot.isContainer = true;
};
}
"#);
}
#[test] #[test]
fn test_hive_autocall() { fn test_hive_autocall() {
TempHive::valid(r#" TempHive::valid(r#"