mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
feat: add Linux system-wide setup
Install shared shims, managed configuration, and login-shell PATH integration so golden images and multi-user hosts can protect package installs for every user. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -188,3 +188,19 @@ func TestRemoveUserConfigFileNeverTouchesGlobal(t *testing.T) {
|
||||
assert.NoFileExists(t, userFile, "per-user file should be removed")
|
||||
assert.FileExists(t, globalFile, "globally managed file must be left intact")
|
||||
}
|
||||
|
||||
func TestWriteAndRemoveSystemTemplateConfig(t *testing.T) {
|
||||
globalDir := t.TempDir()
|
||||
useManagedConfigDir(t, globalDir)
|
||||
|
||||
require.NoError(t, WriteSystemTemplateConfig())
|
||||
assert.FileExists(t, filepath.Join(globalDir, "config.yml"))
|
||||
assert.Equal(t, globalDir, SystemConfigDir())
|
||||
assert.Equal(t, filepath.Join(globalDir, "config.yml"), globalConfigFilePath())
|
||||
|
||||
require.NoError(t, WriteSystemTemplateConfig())
|
||||
|
||||
require.NoError(t, RemoveSystemConfigFile())
|
||||
assert.NoFileExists(t, filepath.Join(globalDir, "config.yml"))
|
||||
require.NoError(t, RemoveSystemConfigFile())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user