<commit_before>#!/bin/bash -x
set -eu

function cleanup {
  rm $FOG_RC
}

# Override default of ~/.fog and delete afterwards.
export FOG_RC=$(mktemp /tmp/vcloud_fog_rc.XXXXXXXXXX)
trap cleanup EXIT

cat <<EOF >${FOG_RC}
${FOG_CREDENTIAL}:
  vcloud_director_host: '${API_HOST}'
  vcloud_director_username: '${API_USERNAME}'
  vcloud_director_password: ''
EOF

git clean -ffdx
bundle install --path "${HOME}/bundles/${JOB_NAME}"

# Obtain the integration test parameters
git clone <EMAIL>:gds/vcloud-tools-testing-config.git
mv vcloud-tools-testing-config/vcloud_tools_testing_config.yaml spec/integration/
rm -rf vcloud-tools-testing-config

eval $(printenv API_PASSWORD | bundle exec vcloud-login)
bundle exec rake
bundle exec rake integration<commit_msg>Revert "Rake not rspec to run the rake task"<commit_after>#!/bin/bash -x
set -eu

function cleanup {
  rm $FOG_RC
}

# Override default of ~/.fog and delete afterwards.
export FOG_RC=$(mktemp /tmp/vcloud_fog_rc.XXXXXXXXXX)
trap cleanup EXIT

cat <<EOF >${FOG_RC}
${FOG_CREDENTIAL}:
  vcloud_director_host: '${API_HOST}'
  vcloud_director_username: '${API_USERNAME}'
  vcloud_director_password: ''
EOF

git clean -ffdx
bundle install --path "${HOME}/bundles/${JOB_NAME}"

# Obtain the integration test parameters
git clone <EMAIL>:gds/vcloud-tools-testing-config.git
mv vcloud-tools-testing-config/vcloud_tools_testing_config.yaml spec/integration/
rm -rf vcloud-tools-testing-config

eval $(printenv API_PASSWORD | bundle exec vcloud-login)
bundle exec rake
bundle exec rspec integration
{'fraction_non_alphanumeric': 0.11413748378728923, 'fraction_numerical': 0.0, 'mean_word_length': 5.402489626556017, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '3550729', 'n_tokens_mistral': 552, 'n_tokens_neox': 541, 'n_words': 137}