<commit_before># Create test data
sudo lxc-attach -n onetest -- bash -c 'cat > ubuntu-docker.tmpl << EOF
NAME="ubuntu"
PATH=docker://rastasheep/ubuntu-sshd
TYPE=OS
DESCRIPTION="Ubuntu Trusty with SSHd"
EOF'

# Create the image
sudo lxc-attach -n onetest -- oneimage create -d onedock ubuntu-docker.tmpl
sleep 2

# Check the image creation status
while sudo lxc-attach -n onetest -- oneimage list | grep ubuntu | awk '{if($9 == "lock"){ exit 0 } else { exit 1 }}'
do
    sleep 2
done
# Check that the image is ready (any other state will generate an error)
sudo lxc-attach -n onetest -- oneimage list | grep ubuntu | awk '{if($9 == "rdy"){ exit 0 } else { exit 1 }}'

# Check that the image exists in the repository
sudo lxc-attach -n onetest -- curl -k -X GET https://onetest:5000/v2/_catalog | grep dockerimage
sudo lxc-attach -n onetest -- curl -k -X GET https://onetest:5000/v2/dockerimage/tags/list | grep 0
<commit_msg>Update docker image used in the onedock tests<commit_after># Create test data
sudo lxc-attach -n onetest -- bash -c 'cat > ubuntu-docker.tmpl << EOF
NAME="ubuntu"
PATH=docker://ubuntu:latest
TYPE=OS
DESCRIPTION="Ubuntu Trusty with SSHd"
EOF'

# Create the image
sudo lxc-attach -n onetest -- oneimage create -d onedock ubuntu-docker.tmpl
sleep 2

# Check the image creation status
while sudo lxc-attach -n onetest -- oneimage list | grep ubuntu | awk '{if($9 == "lock"){ exit 0 } else { exit 1 }}'
do
    sleep 2
done
# Check that the image is ready (any other state will generate an error)
sudo lxc-attach -n onetest -- oneimage list | grep ubuntu | awk '{if($9 == "rdy"){ exit 0 } else { exit 1 }}'

# Check that the image exists in the repository
sudo lxc-attach -n onetest -- curl -k -X GET https://onetest:5000/v2/_catalog | grep dockerimage
sudo lxc-attach -n onetest -- curl -k -X GET https://onetest:5000/v2/dockerimage/tags/list | grep 0

{'fraction_non_alphanumeric': 0.11918760021378942, 'fraction_numerical': 0.020309994655264563, 'mean_word_length': 3.588235294117647, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '826362', 'n_tokens_mistral': 709, 'n_tokens_neox': 607, 'n_words': 247}