Skip to content

Commit

Permalink
test: further fixing up of python-pii-redactor test
Browse files Browse the repository at this point in the history
it should hopefully be g2g now, short of missing imports (see #314)

Signed-off-by: Nick Mitchell <[email protected]>
  • Loading branch information
starpit committed Oct 3, 2024
1 parent 6467740 commit 39d75e1
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/be/local/shell/spawn.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ func addEnv(c llir.ShellComponent, q llir.Queue) ([]string, error) {
"LUNCHPAIL_POD_NAME=" + c.InstanceName,
"TEST_QUEUE_ENDPOINT=" + q.Endpoint,
"LUNCHPAIL_TARGET=local",
"PYTHONUNBUFFERED=1",
}

env, err = addAppEnv(env, c)
Expand Down
1 change: 1 addition & 0 deletions tests/bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ unset testname
unset deployname
expected=()

export TEST_PATH=$(cd "$1" && pwd)
. "$1"/settings.sh

testname="${testname-$(basename $1)}"
Expand Down
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions tests/tests/python-pii-redactor/post.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh

DATA="$TEST_PATH"/pail/test-data

actual="$DATA"/xs/1.output.parquet
expected="$DATA"/xs/1.expected.parquet.gz

if [ -f $actual ]
then echo "✅ PASS found local task output file=$actual test=$TEST_NAME" && rm -f $actual
else echo "❌ FAIL cannot find local task output file=$actual test=$TEST_NAME" && exit 1
fi

actual_sha256=$(cat "$actual" | sha256)
expected_sha256=$(gzcat "$expected" | sha256 )

if [ "$actual_sha256" = "$expected_sha256" ]
then echo "✅ PASS found local task output file=$f test=$TEST_NAME" && rm -f $f
else echo "❌ FAIL cannot find local task output file=$f test=$TEST_NAME" && exit 1
fi

deactivate
6 changes: 6 additions & 0 deletions tests/tests/python-pii-redactor/settings.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
api=workqueue

expected=("SequenceTagger predicts")
NUM_DESIRED_OUTPUTS=1

up_args='<(gzcat "$TEST_PATH"/pail/test-data/xs/1.parquet.gz)'

0 comments on commit 39d75e1

Please sign in to comment.