mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-14 05:30:55 +00:00
Contain agent command authority
This commit is contained in:
parent
6453593b4b
commit
a966264bb1
46 changed files with 935 additions and 237 deletions
|
|
@ -326,9 +326,14 @@ func TestInstallPS1PreservesCommandExecutionParity(t *testing.T) {
|
|||
script := string(content)
|
||||
required := []string{
|
||||
`[bool]$EnableCommands = $false,`,
|
||||
`[string]$CommandAuthority = $env:PULSE_COMMAND_AUTHORITY,`,
|
||||
`if (-not $PSBoundParameters.ContainsKey('EnableCommands') -and -not [string]::IsNullOrWhiteSpace($env:PULSE_ENABLE_COMMANDS)) {`,
|
||||
`$EnableCommands = Parse-Bool $env:PULSE_ENABLE_COMMANDS $EnableCommands`,
|
||||
`if ($EnableCommands) { $ServiceArgs += "--enable-commands" }`,
|
||||
`$ServiceArgs += @("--command-authority", "` + "`" + `"$CommandAuthority` + "`" + `"")`,
|
||||
`$CommandAuthority = 'monitoring-only'`,
|
||||
`$CommandAuthority = 'legacy'`,
|
||||
`$CommandAuthority = 'command-capable'`,
|
||||
}
|
||||
for _, needle := range required {
|
||||
if !strings.Contains(script, needle) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue