Skip to content

Commit

Permalink
Update test_auto_injection_python.shell
Browse files Browse the repository at this point in the history
  • Loading branch information
plengauer authored Jan 8, 2025
1 parent b32865f commit 515463c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions tests/auto/test_auto_injection_python.shell
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@ if ! which python3; then exit 0; fi

. otel.sh

which echo
ls -la /snap/bin/echo
readlink -f /snap/bin/echo

echo '
import os
os.spawnlp(os.P_WAIT, "echo", "echo", "hello", "world", "3")
' | python3
assert_equals 0 $?
span="$(resolve_span '.name == "echo hello world 3"')"
span="$(resolve_span '.name == "/usr/bin/echo hello world 3"')"
assert_equals "SpanKind.INTERNAL" $(\echo "$span" | \jq -r '.kind')
assert_not_equals null $(\echo "$span" | \jq -r '.parent_id')

Expand Down Expand Up @@ -51,7 +47,7 @@ import os
os.spawnlp(os.P_WAIT, "echo", "echo", "hello", "world", "3")
' | python3
assert_equals 0 $?
span="$(resolve_span '.name == "echo hello world 3"')"
span="$(resolve_span '.name == "/usr/bin/echo hello world 3"')"
assert_equals "SpanKind.INTERNAL" $(\echo "$span" | \jq -r '.kind')
assert_not_equals null $(\echo "$span" | \jq -r '.parent_id')

Expand All @@ -69,7 +65,7 @@ import os
os.spawnvp(os.P_WAIT, "echo", ["echo", "hello", "world", "5"])
' | python3
assert_equals 0 $?
span="$(resolve_span '.name == "echo hello world 5"')"
span="$(resolve_span '.name == "/usr/bin/echo hello world 5"')"
assert_equals "SpanKind.INTERNAL" $(\echo "$span" | \jq -r '.kind')
assert_not_equals null $(\echo "$span" | \jq -r '.parent_id')

Expand Down

0 comments on commit 515463c

Please sign in to comment.