Skip to content

Commit 137f23f

Browse files
minor fix
1 parent 6a681de commit 137f23f

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

e2e_tests/boundary_integration_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ package e2e_tests
33
import (
44
"bytes"
55
"context"
6+
"fmt"
67
"os"
78
"os/exec"
9+
"os/user"
810
"path/filepath"
911
"strings"
1012
"testing"
@@ -122,6 +124,13 @@ func TestBoundaryIntegration(t *testing.T) {
122124

123125
// Test HTTPS request through boundary (from inside the jail)
124126
t.Run("HTTPSRequestThroughBoundary", func(t *testing.T) {
127+
u, err := user.Current()
128+
if err != nil {
129+
panic(err)
130+
}
131+
fmt.Printf("u.Username: %v\n", u.Username)
132+
fmt.Printf("u.HomeDir: %v\n", u.HomeDir)
133+
125134
// Run curl directly in the namespace using ip netns exec
126135
// TODO(yevhenii): remove env
127136
curlCmd := exec.Command("sudo", "ip", "netns", "exec", namespaceName,

jail/linux.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,18 @@ func NewLinuxJail(config Config) (*LinuxJail, error) {
4343
func (l *LinuxJail) Start() error {
4444
l.logger.Debug("Setup called")
4545

46+
e := getEnvs(l.configDir, l.caCertPath)
47+
//p := fmt.Sprintf("http://localhost:%d", l.httpProxyPort)
48+
l.commandEnv = mergeEnvs(e, map[string]string{
49+
//"HOME": l.homeDir,
50+
//"USER": l.username,
51+
//"LOGNAME": l.username,
52+
//"HTTP_PROXY": p,
53+
//"HTTPS_PROXY": p,
54+
//"http_proxy": p,
55+
//"https_proxy": p,
56+
})
57+
4658
// Setup DNS configuration BEFORE creating namespace
4759
// This ensures the namespace-specific resolv.conf is available when namespace is created
4860
err := l.setupDNS()

0 commit comments

Comments
 (0)