<commit_before>#!/bin/bash

set -x

# running the test container - the container will exit immediately 
# we map a volume that contains junit xml example file to be used as the results dir
docker run -v "$PWD"/integration-tests:/tmp --label tugbot.test=true --label tugbot.results.dir=/tmp alpine /bin/sh

# running mock http server to simulate tar.gz result service api and json test result service api
docker run -d -p 8085:8085 --name mock-result-service msoap/shell2http -port=8085 -cgi /tar-results 'cat /dev/stdin > result.tar' /get-tar-results 'cat result.tar > /dev/stdout' /json-results 'cat /dev/stdin > result.json' /get-json-results 'cat result.json > /dev/stdout'

# running tugbot-collect to report the test results from the test container into the mock result service
docker run -d --name tugbot-collect --link mock-result-service:mock-result-service -v /var/run/docker.sock:/var/run/docker.sock gaiadocker/tugbot-collect tugbot-collect --scanOnStartup --publishTestsTo http://mock-result-service:8085/json-results --publishTarGzTo http://mock-result-service:8085/tar-results

sleep 1

# check that the mock result service recieved the data
curl http://localhost:8085/get-tar-results | tar tvz | grep results.tar
curl http://localhost:8085/get-json-results | grep TugbotData | grep NumericStatus

# clear mock server and start a new one
docker stop mock-result-service 
docker rm mock-result-service
docker run -d -p 8085:8085 --name mock-result-service msoap/shell2http -port=8085 -cgi /tar-results 'cat /dev/stdin > result.tar' /get-tar-results 'cat result.tar > /dev/stdout' /json-results 'cat /dev/stdin > result.json' /get-json-results 'cat result.json > /dev/stdout'

# run again the test container - to check that tugbot-collect can catch docker events
docker run -v "$PWD"/integration-tests:/tmp --label tugbot.test=true --label tugbot.results.dir=/tmp alpine /bin/sh

sleep 1<commit_msg>trying to fix build<commit_after>#!/bin/bash

set -x

# running the test container - the container will exit immediately 
# we map a volume that contains junit xml example file to be used as the results dir
docker run -v "$PWD"/integration-tests:/tmp --label tugbot.test=true --label tugbot.results.dir=/tmp alpine /bin/sh

# running mock http server to simulate tar.gz result service api and json test result service api
docker run -d -p 8085:8085 --name mock-result-service msoap/shell2http -port=8085 -cgi /tar-results 'cat /dev/stdin > result.tar' /get-tar-results 'cat result.tar > /dev/stdout' /json-results 'cat /dev/stdin > result.json' /get-json-results 'cat result.json > /dev/stdout'

# running tugbot-collect to report the test results from the test container into the mock result service
docker run -d --name tugbot-collect --link mock-result-service:mock-result-service -v /var/run/docker.sock:/var/run/docker.sock gaiadocker/tugbot-collect tugbot-collect --scanOnStartup --publishTestsTo http://mock-result-service:8085/json-results --publishTarGzTo http://mock-result-service:8085/tar-results

sleep 1

# check that the mock result service recieved the data
curl http://localhost:8085/get-tar-results | tar tvz | grep results.tar
curl http://localhost:8085/get-json-results | grep TugbotData | grep NumericStatus

# clear mock server and start a new one
docker stop mock-result-service 
docker rm --force mock-result-service
docker run -d -p 8085:8085 --name mock-result-service msoap/shell2http -port=8085 -cgi /tar-results 'cat /dev/stdin > result.tar' /get-tar-results 'cat result.tar > /dev/stdout' /json-results 'cat /dev/stdin > result.json' /get-json-results 'cat result.json > /dev/stdout'

# run again the test container - to check that tugbot-collect can catch docker events
docker run -v "$PWD"/integration-tests:/tmp --label tugbot.test=true --label tugbot.results.dir=/tmp alpine /bin/sh

sleep 1
{'fraction_non_alphanumeric': 0.11470281543274244, 'fraction_numerical': 0.022940563086548488, 'mean_word_length': 3.9382239382239383, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6935005', 'n_tokens_mistral': 1287, 'n_tokens_neox': 1176, 'n_words': 405}