mirror of
https://github.com/mudler/luet.git
synced 2025-09-12 21:33:31 +00:00
Integrate tests for config protects with uninstall
This commit is contained in:
@@ -347,7 +347,8 @@ func (a *PackageArtifact) GetProtectFiles() []string {
|
|||||||
cp := NewConfigProtect(annotationDir)
|
cp := NewConfigProtect(annotationDir)
|
||||||
cp.Map(a.Files)
|
cp.Map(a.Files)
|
||||||
|
|
||||||
ans = cp.GetProtectFiles()
|
// NOTE: for unpack we need files path without initial /
|
||||||
|
ans = cp.GetProtectFiles(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
return ans
|
return ans
|
||||||
|
@@ -91,6 +91,7 @@ testUnInstall() {
|
|||||||
assertTrue 'package uninstalled' "[ ! -e '$tmpdir/testrootfs/c' ]"
|
assertTrue 'package uninstalled' "[ ! -e '$tmpdir/testrootfs/c' ]"
|
||||||
# TODO: we need remove it or not??
|
# TODO: we need remove it or not??
|
||||||
assertTrue 'config protect created' "[ -e '$tmpdir/testrootfs/etc/a/._cfg0001_conf' ]"
|
assertTrue 'config protect created' "[ -e '$tmpdir/testrootfs/etc/a/._cfg0001_conf' ]"
|
||||||
|
assertTrue 'config protect maintains the protected files' "[ -e '$tmpdir/testrootfs/etc/a/conf' ]"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -91,6 +91,7 @@ testUnInstall() {
|
|||||||
assertTrue 'package uninstalled' "[ ! -e '$tmpdir/testrootfs/c' ]"
|
assertTrue 'package uninstalled' "[ ! -e '$tmpdir/testrootfs/c' ]"
|
||||||
# TODO: we need remove it or not??
|
# TODO: we need remove it or not??
|
||||||
assertTrue 'config protect created' "[ -e '$tmpdir/testrootfs/opt/etc/._cfg0001_conf' ]"
|
assertTrue 'config protect created' "[ -e '$tmpdir/testrootfs/opt/etc/._cfg0001_conf' ]"
|
||||||
|
assertTrue 'config protect maintains the protected files' "[ -e '$tmpdir/testrootfs/opt/etc/conf' ]"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user