- "host1.example.org: <nil> 3 host groups: all group-a group-b host1.example.org",
- "host1.example.org: <nil> 3 host group priorities (desc. order): host1.example.org group-a group-b all",
- `host1.example.org: <nil> 4 files: "/etc": group group-a overwrites triggers from group group-b`,
- `host1.example.org: <nil> 4 files: "/etc": group host1.example.org overwrites triggers from group group-a`,
+ "3 false host groups: all group-a group-b host1.example.org",
+ "3 false host group priorities (descending): host1.example.org group-a group-b all",
+ `4 false files: "/etc": group group-a overwrites triggers from group group-b`,
+ `4 false files: "/etc": group host1.example.org overwrites triggers from group group-a`,
+ },
+ nil,
+ },
+
+ {
+ "group_priority (single group)",
+ "project-group_priority-single",
+ "host1.example.org",
+ nil,
+ safcm.MsgSyncReq{
+ Groups: []string{"all", "group-b", "group-a", "host1.example.org"},
+ Files: map[string]*safcm.File{
+ "/": {
+ OrigGroup: "group-a",
+ Path: "/",
+ Mode: fs.ModeDir | 0755,
+ Uid: -1,
+ Gid: -1,
+ },
+ "/file.txt": {
+ OrigGroup: "group-a",
+ Path: "/file.txt",
+ Mode: 0644,
+ Uid: -1,
+ Gid: -1,
+ Data: []byte("file.txt: from group-a\n"),
+ },
+ },
+ },
+ []string{
+ "3 false host groups: all group-a group-b host1.example.org",
+ "3 false host group priorities (descending): host1.example.org group-a",