delete stale corona-virus test, update README

This commit is contained in:
Andy Arthur
2021-04-13 15:13:19 -07:00
parent 4c515a613f
commit 1d18cf955c
2 changed files with 7 additions and 110 deletions
+7 -5
View File
@@ -2,8 +2,10 @@
These tests attempt to ensure forward and backward compatibility for Dolt versions.
For each Dolt release version listed in `versions.txt`, `runner.sh` creates a legacy Dolt repository using the
`/test_files/setup_repo.sh` script in a directory named with the corresponding version.
An additional Dolt repository is created using Dolt built from the initial git branch.
BATS tests, located in `test_files/bats/`, are used to verify the forward and backward compatibility of all Dolt versions
and the repositories created with those versions.
For each Dolt release version listed in `test_files/backward_compatible_versions.txt`, a legacy repository is created
using the corresponding release and populated with data from `test_files/setup_repo.sh`.
Then, using a Dolt client build at HEAD, a series of BATS tests are run against each legacy repository.
To test forward compatibility, a repository is created and populated using Dolt built at HEAD.
For each Dolt release version listed in `test_files/forward_compatible_versions.txt`, the same BATS tests are run
against the repo created with Dolt at HEAD.
@@ -1,105 +0,0 @@
#!/bin/bash
set -eo pipefail
function download_release() {
ver=$1
dirname=binaries/"$ver"
mkdir "$dirname"
basename=dolt-"$PLATFORM_TUPLE"
filename="$basename".tar.gz
filepath=binaries/"$ver"/"$filename"
url="https://github.com/dolthub/dolt/releases/download/$ver/$filename"
curl -L -o "$filepath" "$url"
cd "$dirname" && tar zxf "$filename"
echo "$dirname"/"$basename"/bin
}
get_platform_tuple() {
OS=$(uname)
ARCH=$(uname -m)
if [ "$OS" != Linux -a "$OS" != Darwin ]; then
echo "tests only support linux or macOS." 1>&2
exit 1
fi
if [ "$ARCH" != x86_64 -a "$ARCH" != i386 -a "$ARCH" != i686 ]; then
echo "tests only support x86_64 or x86." 1>&2
exit 1
fi
if [ "$OS" == Linux ]; then
PLATFORM_TUPLE=linux
else
PLATFORM_TUPLE=darwin
fi
if [ "$ARCH" == x86_64 ]; then
PLATFORM_TUPLE="$PLATFORM_TUPLE"-amd64
else
PLATFORM_TUPLE="$PLATFORM_TUPLE"-386
fi
echo "$PLATFORM_TUPLE"
}
PLATFORM_TUPLE=`get_platform_tuple`
function export_tables() {
dv=`dolt version`
echo "exporting tables with dolt version $dv"
for table in \
case_details \
cases \
characteristics_age \
characteristics_case_severity \
characteristics_comorbid_condition \
characteristics_occupation \
characteristics_onset_date_range \
characteristics_province \
characteristics_sex \
characteristics_wuhan_exposed \
dolt_query_catalog \
dolt_schemas \
places
do
dolt table export "$table" "$table$1.csv"
dolt sql -r csv -q "select * from $table" | sed 's/NULL//g' > "$table$1.sql.csv"
done
}
function diff_tables() {
for table in \
case_details \
cases \
characteristics_age \
characteristics_case_severity \
characteristics_comorbid_condition \
characteristics_occupation \
characteristics_onset_date_range \
characteristics_province \
characteristics_sex \
characteristics_wuhan_exposed \
dolt_query_catalog \
dolt_schemas \
places
do
diff "$table-pre.csv" "$table-post.csv"
diff "$table-pre.sql.csv" "$table-post.sql.csv"
done
}
function cleanup() {
popd
rm -rf binaries
rm -rf "corona-virus"
}
mkdir binaries
trap cleanup "EXIT"
bin=`download_release "v0.15.0"`
local_bin="`pwd`"/"$bin"
PATH="$local_bin":"$PATH" dolt clone Liquidata/corona-virus
pushd "corona-virus"
PATH="$local_bin":"$PATH" export_tables "-pre"
time dolt migrate
export_tables "-post"
diff_tables
echo "success!"