<commit_before>#!/bin/bash -xe
test_image() {
    IMAGE=$1
    ./atomic uninstall ${IMAGE} || true
    ./atomic install ${IMAGE}
    ./atomic uninstall ${IMAGE}
    ./atomic info ${IMAGE}
    ./atomic run --spc ${IMAGE} /bin/ps
    ./atomic run ${IMAGE} /bin/ps
    ./atomic run --name=atomic_test ${IMAGE} sleep 6000 &
    ./atomic run --name=atomic_test ${IMAGE} ps 
    ./atomic uninstall --name=atomic_test ${IMAGE}
}
test_image busybox
test_image fedora

cat > Dockerfile <<EOF
FROM busybox
EOF
docker build -t atomic_busybox .
./atomic info atomic_busybox
cat > Dockerfile <<EOF
FROM busybox
LABEL RUN /usr/bin/docker run -ti --rm IMAGE /bin/echo RUN
LABEL INSTALL /usr/bin/docker run -ti --rm IMAGE /bin/echo INSTALL
LABEL UNINSTALL /usr/bin/docker run -ti --rm IMAGE /bin/echo UNINSTALL
EOF
docker build -t atomic_busybox .
./atomic run atomic_busybox | grep RUN
./atomic install atomic_busybox | grep INSTALL
./atomic uninstall atomic_busybox | grep UNINSTALL<commit_msg>Add tests for atomic version<commit_after>#!/bin/bash -xe
test_image() {
    IMAGE=$1
    ./atomic uninstall ${IMAGE} || true
    ./atomic install ${IMAGE}
    ./atomic uninstall ${IMAGE}
    ./atomic info ${IMAGE}
    ./atomic run --spc ${IMAGE} /bin/ps
    ./atomic run ${IMAGE} /bin/ps
    ./atomic run --name=atomic_test ${IMAGE} sleep 6000 &
    ./atomic run --name=atomic_test ${IMAGE} ps 
    ./atomic version ${IMAGE}
    ./atomic uninstall --name=atomic_test ${IMAGE}
}
test_image busybox
test_image fedora

cat > Dockerfile <<EOF
FROM busybox
EOF
docker build -t atomic_busybox .
./atomic info atomic_busybox
./atomic version atomic_busybox
cat > Dockerfile <<EOF
FROM busybox
LABEL RUN /usr/bin/docker run -ti --rm IMAGE /bin/echo RUN
LABEL INSTALL /usr/bin/docker run -ti --rm IMAGE /bin/echo INSTALL
LABEL UNINSTALL /usr/bin/docker run -ti --rm IMAGE /bin/echo UNINSTALL
LABEL Name Atomic Busybox
LABEL Version 1.0
LABEL Release 1.0
EOF
docker build -t atomic_busybox .
./atomic run atomic_busybox | grep RUN
./atomic install atomic_busybox | grep INSTALL
./atomic version atomic_busybox | grep Atomic
./atomic uninstall atomic_busybox | grep UNINSTALL
{'fraction_non_alphanumeric': 0.11934731934731935, 'fraction_numerical': 0.006526806526806527, 'mean_word_length': 3.283433133732535, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '5838797', 'n_tokens_mistral': 740, 'n_tokens_neox': 697, 'n_words': 244}