Skip to content

Commit

Permalink
testsuite: test flux submit --add-file=name=DATA
Browse files Browse the repository at this point in the history
Problem: No test in the testsuite ensures that the submission cli
`--add-file` option properly detects '\n' in DATA and treats it like
file data instead of a path.

Add a test to t2710-python-cli-submit.t.
  • Loading branch information
grondo committed Dec 13, 2024
1 parent cc37ef8 commit 5f28bb3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions t/t2710-python-cli-submit.t
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,11 @@ test_expect_success 'flux submit --add-file=name=file works' '
cp {{tmpdir}}/myfile . &&
test_cmp file.txt myfile
'
test_expect_success 'flux submit --add-file=name=data works' '
flux submit -n1 --watch --add-file=add-file.test="this is a test\n" \
cp {{tmpdir}}/add-file.test . &&
grep "this is a test" add-file.test
'
test_expect_success 'flux submit --add-file complains for non-regular files' '
test_must_fail flux submit -n1 --add-file=/tmp hostname
'
Expand Down

0 comments on commit 5f28bb3

Please sign in to comment.