Z0 pacman-config-first: the pacman module declares its config file before its package
The apply stops at the first failure and the package fails while the config file is missing (A-26). Builds: design 42 zfs-owns-zfs §1, A-26
This commit is contained in:
@@ -133,3 +133,15 @@ func TestTheReflectorPackageIsDeclaredBeforeTheFileItShips(t *testing.T) {
|
||||
t.Fatalf("a package's file and timer come after the package: %v", order)
|
||||
}
|
||||
}
|
||||
|
||||
// TestThePackageManagersConfigIsDeclaredBeforeItsPackage holds design 42 zfs-owns-zfs §1 and A-26: the
|
||||
// apply stops at the first failure, and the package fails while its config file is missing.
|
||||
func TestThePackageManagersConfigIsDeclaredBeforeItsPackage(t *testing.T) {
|
||||
order := map[string]int{}
|
||||
for i, r := range manifest(t).Resources {
|
||||
order[r["id"].(string)] = i
|
||||
}
|
||||
if order["config"] >= order["package"] {
|
||||
t.Fatalf("the config file comes before the package: %v", order)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,11 +89,6 @@
|
||||
"pacman_config"
|
||||
],
|
||||
"resources": [
|
||||
{
|
||||
"id": "package",
|
||||
"type": "package",
|
||||
"package": "pacman"
|
||||
},
|
||||
{
|
||||
"id": "config",
|
||||
"type": "file",
|
||||
@@ -101,6 +96,11 @@
|
||||
"mode": "0644",
|
||||
"template": "files/pacman.conf"
|
||||
},
|
||||
{
|
||||
"id": "package",
|
||||
"type": "package",
|
||||
"package": "pacman"
|
||||
},
|
||||
{
|
||||
"id": "contrib",
|
||||
"type": "package",
|
||||
|
||||
Reference in New Issue
Block a user