use t.Fatal if we cannot enable process privileges

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
Gabriel Adrian Samfira 2023-03-13 01:15:55 -07:00
parent e31bef15fa
commit 47dd3dcffb

View File

@ -33,7 +33,7 @@ func runTestSnapshotterClient(t *testing.T) {
// The SeBackupPrivilege and SeRestorePrivilege gives us access to system files inside the container mount points
// (and everywhere on the system), without having to explicitly set DACLs on each location inside the mount point.
if err := winio.EnableProcessPrivileges([]string{winio.SeBackupPrivilege, winio.SeRestorePrivilege}); err != nil {
t.Error(err)
t.Fatal(err)
}
defer winio.DisableProcessPrivileges([]string{winio.SeBackupPrivilege, winio.SeRestorePrivilege})
testsuite.SnapshotterSuite(t, "SnapshotterClient", newSnapshotter)