Skip to content

Commit

Permalink
Create query log to stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel_Shilin committed Nov 21, 2023
1 parent ce944f7 commit b63129f
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions clt_tests/tests/query_log_to_stdout.rep
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
You can use regex in the output sections.
More info here: https://github.com/manticoresoftware/clt#refine
––– input –––
(dockerd > /var/log/dockerd.log 2>&1 &) > /dev/null
––– output –––
––– input –––
timeout 60 tail -n 100 -f /var/log/dockerd.log | grep -qm1 'API listen on /var/run/docker.sock' && echo 'Done' || echo 'Timeout failed'
––– output –––
Done
––– input –––
docker ps
––– output –––
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
––– input –––
docker build --build-arg="DEV=1" -t manticoresoftware/manticore:current /docker/ > /dev/null 2>&1; echo $?
––– output –––
0
––– input –––
docker run -d -e QUERY_LOG_TO_STDOUT=true --name manticore manticoresoftware/manticore:current
––– output –––
c69dee4f8b086e26e492beca535317b489e3357d0ccc581bdf74320cc6dc11a9
––– input –––
sleep 5;docker logs manticore | grep "accepting connections"
––– output –––
accepting connections
––– input –––
docker exec manticore mysql -e "CREATE TABLE a; SELECT * FROM a;"
––– output –––
––– input –––
docker logs manticore | grep "SELECT * FROM a;"
––– output –––

0 comments on commit b63129f

Please sign in to comment.