<commit_before>#!/bin/bash

function setup_testing_environment() {
  echo "Setting up Docker testing environment ..."
  # Create dind daemon with a mount to project.
  testing_env_build=$(docker run --privileged --name decompose-docker-backup-testing -d docker:dind)
  [ "$?" == "1" ] && echo "$testing_env_build"

  # Build testing image
  local project_directory=$(readlink -f "$DIR/../")
  local tmp_tester_build="/tmp/decompose-docker-backup-testing"
  # Copy volume so we can safely dereference symlinks
  # Create docker container for doing tests
  cp -rL "$project_directory/." "$tmp_tester_build"
  cp "$project_directory/test/Dockerfile.tester" "$tmp_tester_build/Dockerfile"
  local testing_env_build=$(docker build -t decompose-docker-backup-testing-tester "$tmp_tester_build/.")
  [ "$?" == "1" ] && echo "$testing_env_build"
}

function run_tests() {
  local tester_image="docker run --rm --link decompose-docker-backup-testing:docker \
decompose-docker-backup-testing-tester"

  $tester_image bats /app/test/bats
}

function teardown_testing_environment() {
  echo "Teardown Docker testing environment ..."
  testing_env_cleanup=$(docker rm -fv decompose-docker-backup-testing)
  [ "$?" == "1" ] && echo "$testing_env_cleanup"

	local tmp_tester_build="/tmp/decompose-docker-backup-testing"
  mv "$tmp_tester_build" "$tmp_tester_build-$(uuidgen)"

  testing_env_cleanup=$(docker rmi decompose-docker-backup-testing-tester)
  [ "$?" == "1" ] && echo "$testing_env_cleanup"
}<commit_msg>Fix spacing issue on one line<commit_after>#!/bin/bash

function setup_testing_environment() {
  echo "Setting up Docker testing environment ..."
  # Create dind daemon with a mount to project.
  testing_env_build=$(docker run --privileged --name decompose-docker-backup-testing -d docker:dind)
  [ "$?" == "1" ] && echo "$testing_env_build"

  # Build testing image
  local project_directory=$(readlink -f "$DIR/../")
  local tmp_tester_build="/tmp/decompose-docker-backup-testing"
  # Copy volume so we can safely dereference symlinks
  # Create docker container for doing tests
  cp -rL "$project_directory/." "$tmp_tester_build"
  cp "$project_directory/test/Dockerfile.tester" "$tmp_tester_build/Dockerfile"
  local testing_env_build=$(docker build -t decompose-docker-backup-testing-tester "$tmp_tester_build/.")
  [ "$?" == "1" ] && echo "$testing_env_build"
}

function run_tests() {
  local tester_image="docker run --rm --link decompose-docker-backup-testing:docker \
decompose-docker-backup-testing-tester"

  $tester_image bats /app/test/bats
}

function teardown_testing_environment() {
  echo "Teardown Docker testing environment ..."
  testing_env_cleanup=$(docker rm -fv decompose-docker-backup-testing)
  [ "$?" == "1" ] && echo "$testing_env_cleanup"

  local tmp_tester_build="/tmp/decompose-docker-backup-testing"
  mv "$tmp_tester_build" "$tmp_tester_build-$(uuidgen)"

  testing_env_cleanup=$(docker rmi decompose-docker-backup-testing-tester)
  [ "$?" == "1" ] && echo "$testing_env_cleanup"
}

# vim:syntax=sh tabstop=2 shiftwidth=2 expandtab
{'fraction_non_alphanumeric': 0.14127243066884176, 'fraction_numerical': 0.0032626427406199023, 'mean_word_length': 4.862332695984704, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5032828', 'n_tokens_mistral': 1059, 'n_tokens_neox': 987, 'n_words': 215}