Files
pmg/sandbox/sandbox_test.go
Abhisek DattaandGitHub c7244f921a feat: Add support for environment protection (scrubbing) (#327)
* feat: Add support for environment variable protection for sandbox

* chore: Update dangerous env var list

* fix: Split profiles for improved environment protection

* fix: pipx sandbox profile separation

* chore: Show sandbox scrub info on error exit

* fix: Code review fixes

* test: Add e2e for sandbox environment scrubbing
2026-06-11 11:40:33 +05:30

21 lines
413 B
Go

package sandbox
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestExecutionResultScrubbedEnvCount(t *testing.T) {
r := NewExecutionResult()
assert.Equal(t, 0, r.ScrubbedEnvCount())
r.SetScrubbedEnvCount(3)
assert.Equal(t, 3, r.ScrubbedEnvCount())
}
func TestExecutionResultScrubbedEnvCountNilReceiver(t *testing.T) {
var r *ExecutionResult
assert.Equal(t, 0, r.ScrubbedEnvCount())
}