Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
amitslavin committed Jul 29, 2024
1 parent 4970742 commit 2a42532
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pkg/network/usm/istio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ func TestIstioSync(t *testing.T) {
// PID 2 -> Bash process
// PID 3 -> Envoy process
func createFakeProcFS(t *testing.T) (procRoot string) {
_, err := os.Stat("/usr/bin/busybox")
if err != nil {
t.Skip("skip for the moment as some distro are not friendly with busybox package")
}

procRoot = t.TempDir()

// Inject fake ProcFS path
Expand All @@ -176,10 +181,8 @@ func createFakeProcFS(t *testing.T) (procRoot string) {
"",
)

err := exec.Command("cp", "/usr/bin/busybox", filepath.Join(procRoot, "ash")).Run()
require.NoError(t, err)
err = exec.Command("cp", "/usr/bin/busybox", filepath.Join(procRoot, "envoy")).Run()
require.NoError(t, err)
require.NoError(t, exec.Command("cp", "/usr/bin/busybox", filepath.Join(procRoot, "ash")).Run())
require.NoError(t, exec.Command("cp", "/usr/bin/busybox", filepath.Join(procRoot, "envoy")).Run())

runFakeProcess(t, procRoot, "1", "/usr/local/bin/envoy")
runFakeProcess(t, procRoot, "3", "/usr/local/bin/envoy")
Expand Down

0 comments on commit 2a42532

Please sign in to comment.