Skip to content

Commit

Permalink
use input file
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Galibey committed Nov 6, 2023
1 parent c3d0540 commit 4977eed
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tests/cli/fluvio_smoke_tests/producer-smartmodule.bats
Original file line number Diff line number Diff line change
Expand Up @@ -291,16 +291,13 @@ setup_file() {
echo "cmd: $BATS_RUN_COMMAND" >&2
assert_output "topic \"$TOPIC_NAME\" created"

# create a transforms yaml
# create an input file
INPUT_FILE="$(mktemp -t producer_aggregate_test_input.XXXXXX)"
export INPUT_FILE
echo "transforms:" > "$INPUT_FILE"
echo " - uses: uppercase" >> "$INPUT_FILE"

echo "Banana" > "$INPUT_FILE"

# Produce to topic with transforms file
TEST_MESSAGE="Banana"
export TEST_MESSAGE
echo "$TEST_MESSAGE" | timeout 15s "$FLUVIO_BIN" produce "$TOPIC_NAME" --transform "{\"uses\":\"$SMARTMODULE_NAME\"}" >&2
"$FLUVIO_BIN" produce "$TOPIC_NAME" --file $INPUT_FILE --transform "{\"uses\":\"$SMARTMODULE_NAME\"}" >&2
#run bash -c 'echo "$TEST_MESSAGE" | timeout 15s "$FLUVIO_BIN" produce "$TOPIC_NAME" --transform "{\"uses\":\"$SMARTMODULE_NAME\"}"'
assert_success

Expand Down

0 comments on commit 4977eed

Please sign in to comment.