Skip to content

Commit

Permalink
fix: wait async write
Browse files Browse the repository at this point in the history
  • Loading branch information
albertolerda committed Jan 17, 2023
1 parent 9f1772b commit 13b82af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,17 @@ jobs:
fi
- name: ⚙️ Execute a contract with logger
run: |
rm -f my.log
curl -s -w "%{stderr}%{http_code}" http://localhost:3000/api/logger_test 2>/tmp/status
res=`cat my.log`
if [[ "$res" == "" ]]; then
echo "Wrong content of log"
echo "$res"
fi
if [[ `cat /tmp/status` != "200" ]]; then
printf "\nerror: "
cat /tmp/status
exit 1
fi
sleep 1
res=`cat my.log`
if [[ "$res" != "HELLOWORLD!" ]]; then
echo "Wrong content of log"
echo "$res"
exit 1
fi
2 changes: 1 addition & 1 deletion contracts/logger_test.zen
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Rule unknown ignore
Given I have a 'string' named 'path'
When I write string 'HELLO WORLD!' in 'string to log'
When I write string 'HELLOWORLD!' in 'string to log'
Then print the data
Then I append the string 'string_to_log' to the logfile named by 'path'

0 comments on commit 13b82af

Please sign in to comment.