File tree Expand file tree Collapse file tree 3 files changed +33
-0
lines changed
Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -euo pipefail
4+
5+ echo ' begin acceptance test suite'
6+ find ./tests -mindepth 1 -type d | while read -r path; do
7+ title=" $( basename " $path " ) "
8+ echo " $title "
9+ mysql=" mysql -h mysql -uroot -proot"
10+ echo ' -> prepare'
11+ $mysql -e " drop database if exists " ' `' " $title " ' `;' " create database " ' `' " $title " ' `;'
12+ echo ' -> seed'
13+ $mysql " $title " < " $path /setup.sql"
14+ echo ' -> dumping'
15+ if ! contents=" $( go run . -hmysql -uroot -proot -c " $path /config.hcl" ) " ; then
16+ echo " ❌ $title "
17+ continue
18+ fi
19+ echo ' -> importing'
20+ if ! $mysql <<< " $contents" ; then
21+ echo " ❌ $title "
22+ continue
23+ fi
24+ echo " ✅ $title "
25+ done
Original file line number Diff line number Diff line change 1+ database "001" {
2+ table "test" {}
3+ }
Original file line number Diff line number Diff line change 1+ create table `test ` (
2+ ` col` json
3+ );
4+ INSERT INTO ` test` (` col` ) VALUES
5+ (' \" --- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\\ nkey1: value1\\ nkey2: value2\\ n\" ' );
You can’t perform that action at this time.
0 commit comments